cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A103781 Sum of any four successive terms is prime, a(1)=a(2)=0,a(3)=1.

Original entry on oeis.org

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

Views

Author

Zak Seidov, Feb 15 2005

Keywords

Crossrefs

Programs

  • 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 *)

Formula

a(n) = A000040(n-3) - a(n-1) - a(n-2) - a(n-3). - Jason Yuen, Sep 01 2024