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!)
A239723 Least number k such that n^k + (n+1)^k + ... + (n+k-1)^k is prime or 0 if no such number exists. 1
2, 1, 1, 2, 1, 0, 1, 0, 2, 0, 1, 2, 1, 2, 0, 6, 1, 0, 1, 0, 6, 2, 1, 2, 2, 0, 0, 0, 1, 2, 1, 2, 0, 2, 2, 0, 1, 0, 2, 0, 1, 2, 1, 0, 0, 0, 1, 6, 0, 2, 0, 0, 1, 0, 0, 0, 0, 6, 1, 2, 1, 0, 0, 0, 2, 0, 1, 0, 2, 2, 1, 2, 1, 0, 0, 6, 0, 0, 1, 0, 0, 2, 1, 2, 2, 0, 2, 0, 1, 2, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(119) = 42. Is a(n) only equal to 0, 1, 2, 6, or 42?
a(n) = 0 is confirmed for k <= 500. See A242927.
LINKS
EXAMPLE
1^1 = 1 is not prime. 1^2+2^2 = 5 is prime. Thus a(1) = 2.
PROG
(PARI) a(n)=for(k=1, 500, if(ispseudoprime(sum(i=0, k-1, (n+i)^k)), return(k)))
n=1; while(n<200, print1(a(n), ", "); n+=1)
CROSSREFS
Cf. A242927.
Sequence in context: A259029 A286128 A197547 * A229541 A015488 A014570
KEYWORD
nonn
AUTHOR
Derek Orr, May 30 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 April 27 15:27 EDT 2024. Contains 372019 sequences. (Running on oeis4.)