PowerMod Is Eventually Periodic

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram CDF Player or other Wolfram Language products.

Requires a Wolfram Notebook System

Edit on desktop, mobile and cloud with any Wolfram Language product.

The sequence is known to be eventually periodic, which is to say that there is a smallest positive such that for all . Naturally we call the period, and the minimal value of , the periodicity onset. L. Euler proved that the period must divide the totient of the modulus .

[more]

In case of coprime and , the onset is zero.

[less]

Contributed by: Oleksandr Pavlyk