The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A257466 Smallest prime number p such that p + pps(1), p + pps(2), ..., p + pps(n) are all prime but p + pps(n+1) is not, where pps(n) is the partial primorial sum (A060389(n)). 2
2, 17, 11, 5, 3, 101, 19469, 38669, 191459, 191, 59, 3877889, 494272241, 360772331, 6004094833991, 41320119600341 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
The n-th member in the sequence m is the smallest prime with exactly n prime terms starting from m + 2.
LINKS
EXAMPLE
For prime 3: 3+2, 3+8, 3+38, 3+248 are all prime. 3+2558 = 13 * 197 is not. So a(4)= 3. (3 is the smallest prime that has exactly 4 terms.)
2 has zero terms because 2+2 is composite, so a(0)=2.
PROG
(PARI) pps(n)=my(s, P=1); forprime(p=2, prime(n), s+=P*=p); s;
isokpps(p, n) = {for (k=1, n, if (!isprime(p+pps(k)), return (0)); ); if (!isprime(p+pps(n+1)), return (1)); }
a(n) = {my(p = 2); while (!isokpps(p, n), p = nextprime(p+1)); p; } \\ Michel Marcus, May 02 2015
CROSSREFS
Sequence in context: A057280 A055677 A362397 * A226291 A359437 A077311
KEYWORD
hard,nonn,more
AUTHOR
Fred Schneider, Apr 25 2015
EXTENSIONS
a(15) from Fred Schneider, May 15 2015
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 May 17 15:44 EDT 2024. Contains 372603 sequences. (Running on oeis4.)