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.
%I A103781 #24 Sep 01 2024 09:36:47 %S A103781 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, %T A103781 29,23,24,31,31,27,38,35,37,29,48,37,43,35,52,43,49,37,62,45,53,39,74, %U A103781 57,57,41,78,63,59,51,84,69,65,53,90,73,67,63,104,77,69,67,118,83,79,69 %N A103781 Sum of any four successive terms is prime, a(1)=a(2)=0,a(3)=1. %H A103781 Harvey P. Dale, <a href="/A103781/b103781.txt">Table of n, a(n) for n = 1..1000</a> %F A103781 a(n) = A000040(n-3) - a(n-1) - a(n-2) - a(n-3). - _Jason Yuen_, Sep 01 2024 %t A103781 (*seed*)b4 = {0, 0, 1}; Do[x = Prime[n] - (b4[[ -1]] + b4[[ -2]] + b4[[ -3]]); b4 = Append[b4, x], {n, 1, 200}]; b4 %t A103781 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 *) %Y A103781 Cf. A000040, A073737, A083242. %K A103781 nonn,easy %O A103781 1,6 %A A103781 _Zak Seidov_, Feb 15 2005