login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A308964 Least k > 0 such that A014222(k) == A014222(k+1) (mod n). 1
1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 3, 1, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 4, 1, 3, 2, 2, 2, 3, 2, 3, 2, 3, 3, 2, 2, 3, 3, 2, 2, 2, 2, 3, 3, 2, 4, 5, 2, 3, 3, 3, 2, 3, 2, 3, 2, 3, 3, 4, 2, 3, 3, 2, 3, 2, 3, 4, 3, 4, 2, 3, 2, 2, 3, 3, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
a(n) is the least positive integer k such that the sequence {A014222(i) mod n} for i >= k is constant. Proof: if g(i) = A014222(i), then n divides 3^g(i-1)*(3^(g(i)-g(i-1)) - 1) when g(i) == g(i+1) (mod n). g(j)-g(j-1) divides g(j+1)-g(j) for any j > 0, therefore, 3^(g(i)-g(i-1)) - 1 divides 3^(g(i+1)-g(i)) - 1. Then n divides 3^g(i)*(3^(g(i+1)-g(i)) - 1) = g(i+2) - g(i+1), that is, g(i) == g(i+1) == g(i+2) (mod n). Since a(n) is the least positive integer k such that g(k) == g(k+1) (mod n), the sequence {A014222(i) mod n} for i >= k is constant.
A014222(k+1) - A014222(k) is the largest n such that a(n) = k.
LINKS
FORMULA
a(n) <= A003434(n).
a(n) <= a(A000010(n)) + 1.
EXAMPLE
3, 27, 7625597484987, ... mod 5 equal 3, 2, 2, ..., so A014222(k) mod 5 = 2 for all k >= 2, hence a(5) = 2.
PROG
(PARI) a(n) = {my(c=0, k=1, x=0, d=n); while(k==1, z=x++; y=0; b=1; while(z>0, while(y++<z, d=eulerphi(d)); b=3^b-floor((3^b-1)/d)*d; z=z-1; y=0; d=n); if(c==b, k=0); c=b); x-1; }
CROSSREFS
Sequence in context: A324117 A106698 A097848 * A124830 A291598 A287820
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Aug 30 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 14:15 EDT 2024. Contains 371914 sequences. (Running on oeis4.)