Section8.2Powers

Let's continue to restrict ourselves to looking at integers modulo some prime \(p\), \(\mathbb{Z}_p\), for a bit longer. This will enable us to get a little more detailed in our exploration. We eventually want to explore solutions to congruences modulo primes and prime powers. What will we start with?

Let's begin by exploring powers. Powers are particularly important, since polynomials are constructed from them. This Sagelet allows exploration of powers \(a^n\) modulo \(p\) for various primes \(p\) and bases \(a\). Notice I have not yet brought in the colors.

Do you see any patterns? It's probably a little early to try to come up with potential theorems, but there should be at least some patterns you see. For instance, do you see any theorems we have already proved in here?

One of the biggest patterns is hard to see in this format, but is the simplest. Given a prime \(p\), you should get get the same answers for \(a\equiv a'\) mod (\(p\)). (This is the essence of the proof last time about a polynomial not having only prime outputs.) So we should really just restrict ourselves to looking at \(0\leq a< p\).

Subsection8.2.1Returning to visualizing

Still, this is a lot of data to assimilate. Is there some way to think about it differently?

This next interact is super-cool, because it combines the short, color-coded format with the much less familiar material of powers.

The colors are not the same as above. The \(a\) row and \(b\) column gives the color corresponding to \((a+1)^b\text{ mod (}p)\; .\)
That means the first (\(0\)th) column is the color for \(a^0=1\) and the second (\(1\)th) column gives the colors of each element \(a^1=a\) of \(\mathbb{Z}_p\). For instance, \((2,4)\) corresponds to \(3^4\equiv 4\) mod (\(7\)) in the initial example below. Notice this color corresponds to the row 3, because of the numbering.

(As far as I know, this representation first appears in Wagon and Bressoud's excellent computational number theory text. The PascGalois project has related visualizations.)

Remark8.2.1

Sage note:
If you don't like the colors, you can change the word in the quotes after the word 'cmap'; if you get rid of that, it will be a grayscale plot. Some others you could try are 'Oranges' or 'hsv' or ... - well, see the cell below this one if you REALLY want to know!

What possible theorems can you see here? (Again, do you see any that we already have discussed?)

We're going to sort of think about this until we come up with some nice theorem regarding whether there are any patterns in \(a^b\) mod (\(p\)) that hold for all \(p\) or all \(a\) or all \(b\) or some of these.