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 A076990 #24 Dec 28 2015 15:07:32 %S A076990 1,2,4,5,8,6,3,10,16,11,14,12,15,20,18,9,26,24,17,30,32,21,36,22,13, %T A076990 38,28,7,44,46,19,42,40,25,48,34,27,52,58,29,50,60,39,64,54,31,66,70, %U A076990 37,56,74,33,72,62,23,78,80,35,76,68,47,82,94,51,84,88,55,86,92,45,90,98 %N A076990 a(1) = 1, a(2) = 2; thereafter a(n) = smallest number not occurring earlier such that the sum of three successive terms is prime. %C A076990 a(n) = n only for n: 1, 2, 6, 12 for all n < 10000. - _Robert G. Wilson v_, Nov 21 2012 %C A076990 a(n) = ~(1 +- 2/5)*n. - _Robert G. Wilson v_, Nov 21 2012 %C A076990 a(n) is odd if and only if n == 1 (mod 3). - _Robert Israel_, Dec 09 2015 %C A076990 The odd terms grow according to a(3k+1) ~ 2k and the even terms according to a(n) ~ 4n/3. - _M. F. Hasler_, Dec 11 2015 %H A076990 Robert Israel, <a href="/A076990/b076990.txt">Table of n, a(n) for n = 1..10000</a> %e A076990 After 8 and 6 the next term is 3 as 8+6+3 = 17 is a prime. %p A076990 N:= 200: # to get all terms before the first > N %p A076990 V:= Vector(N): %p A076990 V[1]:= 1: V[2]:= 1: %p A076990 A[1]:= 1: A[2]:= 2: %p A076990 m0:= 3: m:= 0: %p A076990 for n from 3 while m <= N do %p A076990 t:= A[n-1]+A[n-2]; %p A076990 m1:= m0 + (m0+t+1 mod 2); %p A076990 for m from m1 to N by 2 do if isprime(m+t) and V[m] = 0 then %p A076990 A[n]:= m; %p A076990 V[m]:= 1; %p A076990 break; %p A076990 fi od: %p A076990 if m = m0 then %p A076990 while m0 < N and V[m0] = 1 do m0:= m0+1 od: %p A076990 fi; %p A076990 od: %p A076990 seq(A[j],j=1..n-2); # _Robert Israel_, Dec 09 2015 %t A076990 f[s_List] := Block[{p = s[[-2]] + s[[-1]], q = 1}, While[ !PrimeQ[p + q] || MemberQ[s, q], q++]; Append[s, q]]; Nest[f, {1, 2}, 70] (* _Robert G. Wilson v_, Nov 21 2012 *) %o A076990 (PARI) A076990(n,verbose=0/*=1 to print all terms*/,a=1,u=0,m=1,L=0)={for(i=2,n,verbose&&print1(a",");u+=1<<a;while(bittest(u,m),m++);my(s=L+a);L=a;forprime(p=s+m,,bittest(u,p-s)&&next;a=p-s;break));a}\\ could be made more efficient using Israel's comment and a second "m" for the (smallest possible) even terms. - _M. F. Hasler_, Dec 11 2015 %Y A076990 Cf. A076045, A073653, A219533. %Y A076990 See also A055265. %K A076990 nonn %O A076990 1,2 %A A076990 _Amarnath Murthy_, Oct 25 2002 %E A076990 More terms from _David Garber_, Oct 30 2002