login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A073629
a(1) = 1; a(2) =2; a(3) = 3; a(n) = smallest number greater than the previous term such that the sum of four successive terms is a prime.
0
1, 2, 3, 5, 7, 8, 9, 13, 17, 20, 21, 25, 31, 32, 39, 47, 49, 56, 59, 63, 73, 74, 83, 87, 93, 96, 97, 103, 105, 114, 117, 121, 127, 134, 139, 141, 143, 146, 147, 151, 155, 160, 165, 167, 169, 172, 175, 185, 187, 192, 193, 197, 205, 214, 223, 235, 239, 240, 253, 259, 261
OFFSET
1,2
EXAMPLE
a(4)=5 as 1+2+3+5=11 is prime, 1+2+3+4=10 composite
MATHEMATICA
nxt[{a_, b_, c_}]:=Module[{k=c+1}, While[!PrimeQ[a+b+c+k], k++]; {b, c, k}]; Transpose[NestList[ nxt[#]&, {1, 2, 3}, 70]][[1]] (* Harvey P. Dale, Aug 29 2012 *)
CROSSREFS
Sequence in context: A001857 A091532 A108345 * A125716 A171614 A029601
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 08 2002
EXTENSIONS
Corrected and extended by Sam Alexander, Feb 26 2005
STATUS
approved