A220025 The period with which the powers of n repeat mod 100000.
1, 1, 2500, 5000, 1250, 8, 625, 500, 2500, 2500, 1, 5000, 2500, 5000, 1250, 2, 625, 2500, 500, 5000, 1, 5000, 2500, 2500, 250, 4, 125, 5000, 2500, 5000, 1, 1250, 500, 2500, 1250, 8, 625, 5000, 2500, 2500, 1, 2500, 2500, 1000, 1250, 8, 625, 2500, 2500, 250, 1
Offset: 0
Examples
a(2) = 2500 since 2^i mod 100000 = 2^(i + 2500) mod 100000, for all i >= 5. a(3) = 5000 since 3^i mod 100000 = 3^(i + 5000) mod 100000, for all i >= 0. But a(7) = 500 since 7^i mod 100000 = 7^(i + 500) mod 100000, for all i >= 0.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Crossrefs
Programs
-
Mathematica
Flatten[Table[s = Table[PowerMod[n, e, 100000], {e, 2, 100000}]; Union[Differences[Position[s, s[[4]]]]], {n, 0, 40}]] (* Vincenzo Librandi, Jan 26 2013 *)
-
PARI
k=100000; for(n=0, 100, x=(n^5)%k; y=(n^6)%k; z=1; while(x!=y, x=(x*n)%k; y=(y*n*n)%k; z++); print1(z", "))
Comments