A220022 The period with which the powers of n repeat mod 100.
1, 1, 20, 20, 10, 1, 5, 4, 20, 10, 1, 10, 20, 20, 10, 2, 5, 20, 4, 10, 1, 5, 20, 20, 2, 1, 1, 20, 20, 10, 1, 10, 4, 20, 10, 2, 5, 20, 20, 10, 1, 5, 20, 4, 10, 1, 5, 20, 20, 2, 1, 2, 20, 20, 10, 2, 5, 4, 20, 10, 1, 5, 20, 20, 10, 1, 5, 20, 4, 10, 1, 10, 20, 20, 2, 2, 1
Offset: 0
Examples
a(2) = 20 since 2^i mod 100, for i = 2..22 = {04, 08, 16, 32, 64, 28, 56, 12, 24, 48, 96, 92, 84, 68, 36, 72, 44, 88, 76, 52, 04}. a(3) = 20 since 3^i mod 100, for i = 0..20 = {01, 03, 09, 27, 81, 43, 29, 87, 61, 83, 49, 47, 41, 23, 69, 07, 21, 63, 89, 67, 01}. But a(7) = 4 since 7^i mod 100, for i = 0..4 = {01, 07, 49, 43, 01}.
Links
- T. D. Noe, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
Crossrefs
Cf. A173635 (period with which the powers of n repeat mod 10).
Programs
-
Mathematica
Flatten[Table[s = Table[PowerMod[n, e, 100], {e, 2, 100}]; Union[Differences[Position[s, s[[1]]]]], {n, 0, 100}]] (* T. D. Noe, Dec 14 2012 *)
-
PARI
for(n=0, 100, x=(n*n)%100; y=(n*n*n)%100; z=1; while(x!=y, x=(x*n)%100; y=(y*n*n)%100; z++); print1(z", "))
Comments