Powers

This algorithm creates a list of numbers to the power (n). Choose a power value (2, 3, or 4) and the quantity of integers for the list.

There are some interesting results when a list of squares is placed within modulo (n). The sequence will reverse itself (i.e. retrograde) at the (n/2)th term in the list (the retrograde will start sooner if n is not prime). For example, at modulo 64 the retrograde will start at the 18th term.

Many thanks to Robert Lyon, who came up with the idea of using a list of powers, but was unable to see this Web based program through to its completion.