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!)
A240235 Least number k such that k*n^k - 1 is prime. a(n) = 0 if no such number exists. 4
3, 2, 1, 1, 8, 1, 2, 1, 10, 2, 2, 1, 2, 1, 2, 167, 2, 1, 12, 1, 2, 2, 29028, 1, 2, 3, 10, 2, 26850, 1, 8, 1, 42, 2, 6, 2, 24, 1, 2, 3, 2, 1, 2, 1, 2, 2, 140, 1, 2, 2, 22, 2, 8, 1, 2064, 2, 468, 6, 2, 1, 362, 1, 2, 2, 6, 3, 26, 1, 2, 3, 20, 1, 2, 1, 28, 2, 38, 5, 3024, 1, 2, 81, 858, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) = 1 iff n-1 is prime.
a(145) is either 0 or > 275000. - Robert G. Wilson v, Jan 23 2017
LINKS
EXAMPLE
1*1^1 - 1 = 0 is not prime. 2*1^2 - 1 = 1 is not prime. 3*1^3 - 1 = 2 is prime. Thus, a(1) = 3.
PROG
(PARI) a(n)=k=1; while(!ispseudoprime(k*n^k-1), k++); return(k); n=1; while(n<100, print(a(n)); n+=1)
CROSSREFS
Sequence in context: A291117 A293181 A229345 * A092742 A316564 A214742
KEYWORD
nonn
AUTHOR
Derek Orr, Apr 02 2014
EXTENSIONS
a(23) and a(29) given using link. - Derek Orr, Aug 16 2014
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 July 12 14:24 EDT 2024. Contains 374251 sequences. (Running on oeis4.)