To Know: If you want/need an “invite link” for the ebook version of the text, it is now listed in canvas on the main page. You shouldn’t need this, but you may find it useful if you bought the ebook version. It allows you to use a special editor for reading your purchased ebook.

To Know: On canvas, you currently have access to Chapters 2, 3 and 7. Chapter 3 has background on modular arithmetic (but without much explanation/intuition). Chapter 7 is about discrete log.

Today’s daily post is a series of exercises.

Compute 2^10223 modulo 101 by hand, showing your work (this shouldn’t be laborious). Hint: use the fact that 101 is prime to reduce the exponent with respect to a known modulus, then use repeated squaring.

These next ones go together (do these by hand):

What is the multiplicative order of 7 mod 4?

Compute 7^7 mod 4 by hand (hint: use above)

Compute phi(10) (that’s Euler phi function).

What is the multiplicative order of 7 mod 10?

What is the last digit of 7^(7^7)?

Use Sage to compute 2^110 modulo 111. Based on the answer, tell me why you can conclude 111 is not prime.

Here’s another multi-stage problem:

Ask Sage to do this: p = next_prime(10); p This computes the next prime after 10.

Next, in the next cell, ask Sage to do this: Mod(3,p)^(p-1) Explain the result.

Next, in the next cell, ask Sage to do this: Mod(3^(p-1),p) Explain the result.

Next cell, ask Sage to do this: p = next_prime(10^240); p This is a much bigger prime, and it takes Sage a moment to find it.

Next, in the next cell, ask Sage to do this: Mod(3,p)^(p-1) Explain the result.

Next, in the next cell, ask Sage to do this: Mod(3^(p-1),p) Explain the result.