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!)
A062391 a(1) = 3, a(2) = 5; a(n+1) = smallest prime number > a(n) such that the sum of any three consecutive terms is a prime. 15
3, 5, 11, 13, 17, 23, 31, 43, 53, 61, 67, 71, 73, 79, 89, 101, 103, 107, 127, 139, 167, 173, 181, 193, 197, 211, 223, 227, 233, 241, 269, 277, 281, 349, 353, 359, 379, 433, 467, 499, 521, 523, 557, 577, 587, 613, 631, 743, 757, 769, 821, 827, 829, 883, 947 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
What is the longest string of consecutive primes? A derived sequence could be the start of the first occurrence of a string of n consecutive primes in this sequence.
See A072225 for relevant info and links. - Zak Seidov, Sep 14 2016
LINKS
EXAMPLE
After 43, the next term is 53, since 31 + 43 + 47 = 121 is not prime and 31 + 43 + 53 = 127 is prime.
MATHEMATICA
a=3; b=5; lst={a, b}; Do[c=a+b+n; If[PrimeQ[c]&&n>b&&PrimeQ[n], AppendTo[lst, n]; a=b; b=n], {n, 0, 8!}]; lst (* Vladimir Joseph Stephan Orlovsky, Dec 17 2008 *)
nxt[{a_, b_}]:=Module[{p=NextPrime[b]}, While[!PrimeQ[a+b+p], p= NextPrime[ p]]; {b, p}]; Transpose[NestList[nxt, {3, 5}, 70]][[1]] (* Harvey P. Dale, Aug 05 2013 *)
PROG
(PARI) { n=a1=0; forprime (p=3, 5*10^5, if (p<6 || isprime(p + s), write("b062391.txt", n++, " ", p); s=a1 + p; a1=p; if (n==1000, break)) ) } \\ Harry J. Smith, Aug 07 2009
CROSSREFS
Cf. A072225.
Sequence in context: A130097 A020612 A072539 * A038951 A020578 A250481
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Jun 27 2001
EXTENSIONS
Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jul 02 2001
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 29 05:33 EDT 2024. Contains 372921 sequences. (Running on oeis4.)