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!)
A308972 Least k > 0 such that A114561(k) == A114561(k+1) mod n. 1
1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 2, 1, 2, 2, 2, 1, 2, 2, 1, 3, 4, 2, 3, 2, 2, 1, 2, 2, 3, 2, 3, 2, 2, 1, 2, 2, 2, 2, 3, 1, 2, 3, 2, 4, 5, 2, 2, 3, 2, 2, 3, 2, 3, 2, 2, 2, 3, 2, 3, 3, 1, 2, 2, 3, 4, 2, 4, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 3, 4, 1, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
A114561(k+1) - A114561(k) is the largest n such that a(n) = k.
LINKS
FORMULA
a(n) <= A003434(n).
a(n) <= a(A000010(n)) + 1. Proof: a(n) <= a(eulerphi(n)) + 1. Proof: If A114561(i) == b(i) mod eulerphi(n), 0 < b(i) <= eulerphi(n), then a(n) is the least k > 0 such that 2^b(k-1) == 2^b(k) mod n. Since A114561(a(eulerphi(n))) == A114561(a(eulerphi(n)) + 1), k <= a(A000010(n)) + 1.
EXAMPLE
4, 4^4, 4^4^4, ... mod 8 equal 4, 0, 0, ..., so A114561(k) mod 8 = 0 for all k >= 2, hence a(8) = 2.
PROG
(PARI) a(n) = {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=4^b-floor((4^b-1)/d)*d; z=z-1; y=0; d=n); if(c==b, k=0); c=b); x-1; }
CROSSREFS
Sequence in context: A257540 A333516 A228202 * A137900 A025837 A111317
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 25 12:53 EDT 2024. Contains 371969 sequences. (Running on oeis4.)