cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A220023 The period with which the powers of n repeat mod 1000.

This page as a plain text file.
%I A220023 #19 Jul 25 2017 02:26:39
%S A220023 1,1,100,100,50,2,25,20,100,50,1,50,100,100,50,2,25,100,20,50,1,50,
%T A220023 100,100,10,1,5,100,100,50,1,50,20,100,50,2,25,100,100,50,1,25,100,20,
%U A220023 50,2,25,100,100,10,1,10,100,100,50,2,25,4,100,50,1,50,100,100
%N A220023 The period with which the powers of n repeat mod 1000.
%C A220023 a(n) will always be a divisor of Phi(1000) = 400.
%C A220023 This sequence is periodic with a period of 1000 because n^i mod 1000 = (n + 1000)^i mod 1000.
%C A220023 For the odd numbers n ending in {1, 3, 7, 9} which are coprime to 10, we can expect the powers of n mod 1000 to loop back to 1, with the value of n^a(n) mod 1000 = 1, but for the other numbers n that are not coprime to 10, they do not loop back to 1.
%C A220023 For the even numbers n ending in {2, 4, 6, 8}, n^a(n) mod 1000 = 376.
%C A220023 For the numbers n ending in 5, n^(2*i) mod 1000 = 625, for all i >= 2.
%C A220023 For the numbers n ending in 0, n^i mod 1000 = 0, for all i >= 3.
%H A220023 Vincenzo Librandi, <a href="/A220023/b220023.txt">Table of n, a(n) for n = 0..1000</a>
%e A220023 a(2) = 100 since 2^i mod 1000 = 2^(i+100) mod 1000, for all i >= 3.
%e A220023 a(3) = 100 since 3^i mod 1000 = 3^(i+100) mod 1000, for all i >= 0.
%e A220023 But a(7) = 20 since 7^i mod 1000 = 7^(i+20) mod 1000, for all i >= 0.
%t A220023 Flatten[Table[s=Table[PowerMod[n, e, 1000], {e, 2, 1000}]; Union[Differences[Position[s, s[[2]]]]], {n, 0, 40}]] (* _Vincenzo Librandi_, Jan 26 2013 *)
%o A220023 (PARI) k=1000; for(n=0, 100, x=(n^3)%k; y=(n^4)%k; z=1; while(x!=y, x=(x*n)%k; y=(y*n*n)%k; z++); print1(z", "))
%Y A220023 Cf. A173635 (period with which the powers of n repeat mod 10).
%Y A220023 Cf. A220022 (period with which the powers of n repeat mod 100).
%K A220023 nonn,base
%O A220023 0,3
%A A220023 _V. Raman_, Dec 15 2012