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 A078706 #9 Sep 01 2024 15:00:03 %S A078706 2,3,6,6,6,6,8,10,12,12,12,14,16,18,18,18,24,32,34,36,38,42,46,48,54, %T A078706 56,64,68,78,90,90,94,102,114,122,124,134,144,148,150,152,160,168,170, %U A078706 178,182,190,192,200,216,220,222,234,234,234,246,260,264,268,270,278,280 %N A078706 a(n) = smallest integer >=a(n-1) such that sum of first n terms is prime. %H A078706 Ivan Neretin, <a href="/A078706/b078706.txt">Table of n, a(n) for n = 1..10000</a> %e A078706 a(1)=2, the first prime. The smallest integer >=2 that yields a prime when added to 2 is 3, so a(2)=3. The smallest integer >=3 that yields a prime when added to 2+3 is 6 so a(3)=6. %t A078706 s = 0; NestList[(s += #; NextPrime[s + # - 1] - s) &, 2, 61] (* _Ivan Neretin_, May 14 2015 *) %t A078706 nxt[{t_,a_}]:=Module[{k=a},While[CompositeQ[t+k],k++];{t+k,k}]; NestList[nxt,{2,2},70][[;;,2]] (* _Harvey P. Dale_, Sep 01 2024 *) %Y A078706 Cf. A051935. %K A078706 easy,nonn %O A078706 1,1 %A A078706 _Neil Fernandez_, Dec 18 2002