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”).

A103781
Sum of any four successive terms is prime, a(1)=a(2)=0,a(3)=1.
1
0, 0, 1, 1, 1, 2, 3, 5, 3, 6, 5, 9, 9, 8, 11, 13, 11, 12, 17, 19, 13, 18, 21, 21, 19, 22, 27, 29, 23, 24, 31, 31, 27, 38, 35, 37, 29, 48, 37, 43, 35, 52, 43, 49, 37, 62, 45, 53, 39, 74, 57, 57, 41, 78, 63, 59, 51, 84, 69, 65, 53, 90, 73, 67, 63, 104, 77, 69, 67, 118, 83, 79, 69
OFFSET
1,6
LINKS
FORMULA
a(n) = A000040(n-3) - a(n-1) - a(n-2) - a(n-3). - Jason Yuen, Sep 01 2024
MATHEMATICA
(*seed*)b4 = {0, 0, 1}; Do[x = Prime[n] - (b4[[ -1]] + b4[[ -2]] + b4[[ -3]]); b4 = Append[b4, x], {n, 1, 200}]; b4
nxt[{a_, b_, c_}] := {b, c, NextPrime[a + b + c] - (a+b + c)}; NestList[nxt, {0, 0, 1}, 100][[All, 1]] (* Harvey P. Dale, Sep 20 2022 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Feb 15 2005
STATUS
approved