login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A322418 Least k > 0 such that A014221(k) == A014221(k+1) mod n. 2
1, 1, 2, 2, 3, 2, 3, 3, 3, 3, 4, 2, 3, 3, 3, 3, 4, 3, 4, 3, 3, 4, 5, 3, 4, 3, 4, 3, 4, 3, 4, 4, 4, 4, 3, 3, 4, 4, 3, 3, 4, 3, 4, 4, 3, 5, 6, 3, 4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 5, 3, 4, 4, 3, 4, 3, 4, 5, 4, 5, 3, 4, 3, 4, 4, 4, 4, 4, 3, 4, 3, 5, 4, 5, 3, 4, 4, 4, 4, 5, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

For any fixed integer n > 0, the sequence 2 mod n, 2^2 mod n, 2^2^2 mod n, that is, the sequence {A014221(i) mod n} for i >= 1 is eventually constant. a(n) is the least index k such that A014221(k) mod n equals this constant.

A038081(k+1) is the largest n such that a(n) = k.

LINKS

Table of n, a(n) for n=1..90.

USAMO, Problem 3, 1991.

FORMULA

a(n) <= A003434(n).

a(n) <= a(A000010(n)) + 1.

If A014221(k) == b(k) mod eulerphi(n), 0 < b(k) <= eulerphi(n), then a(n) is the least m > 0 such that 2^b(m-1) == 2^b(m) mod n.

EXAMPLE

2, 4, 16, ... mod 6 equal 2, 4, 4, ..., so A014221(k) mod 6 = 4 for all k >= 2, hence a(6) = 2.

PROG

(PARI) a(n) = {c=0; k=1; x=1; d=n; while(k==1, z=x; y=1; b=1; while(z>0, while(y<z, d=eulerphi(d); y++); b=2^b-floor((2^b-1)/d)*d; z=z-1; y=1; d=n); if(c==b, k=0); c=b; x++); x-2; }

CROSSREFS

Cf. A014221, A038081, A000010, A003434.

Sequence in context: A080071 A202472 A235613 * A019569 A003434 A330808

Adjacent sequences:  A322415 A322416 A322417 * A322419 A322420 A322421

KEYWORD

nonn

AUTHOR

Jinyuan Wang, Dec 07 2018

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 26 16:16 EDT 2020. Contains 337373 sequences. (Running on oeis4.)