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!)
A328920 let f(N) be the smallest index m such that from the m-th term on, the sequence {k^k mod N: k >= 0} enters into a cycle, then a(n) is the smallest number N such that f(N) = n, or 0 if no such n exists. 1
1, 2, 0, 8, 81, 0, 15625, 128, 5764801, 0, 0, 2048, 3138428376721, 1594323, 3937376385699289, 32768, 43046721, 0, 14063084452067724991009, 524288, 37589973457545958193355601, 476837158203125, 31381059609, 8388608, 480250763996501976790165756943041, 847288609443, 0, 134217728, 0, 3219905755813179726837607 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

By the formula for f(N) shown in A328914, a(n) = 0 if and only if n > 1 and n-1 is powerful (n-1 is in A001694). Note that if f(N) = n, where N = Product_{i=1..t} p_i^e_i, then f(p_i^e_i) <= n, and there exists some i such that f(p_i^e_i) = n.

LINKS

Table of n, a(n) for n=0..29.

FORMULA

a(0) = 1, a(1) = 2; for n > 1, let p be the smallest prime such that n-1 is divisible by p but not by p^2, then a(n) = p^n, or 0 if no such p exists.

EXAMPLE

By the formula shown in A328914, if f(N) = 7, then N must be divisible by either 2^7 = 128 or 3^7 = 729, so the smallest N is a(7) = 128.

PROG

(PARI) a(n) = if(n==0, 1, if(n==1, 2, my(v=factor(n-1)); for(i=1, omega(n-1), if(v[i, 2]==1, return(v[i, 1]^n))); return(0)))

CROSSREFS

Cf. A328914, A001694.

Sequence in context: A326425 A308782 A101682 * A033836 A185159 A326240

Adjacent sequences:  A328917 A328918 A328919 * A328921 A328922 A328923

KEYWORD

nonn

AUTHOR

Jianing Song, Oct 31 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 23 20:31 EDT 2021. Contains 348215 sequences. (Running on oeis4.)