The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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. 8
 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, 38, 28, 7, 44, 46, 19, 42, 40, 25, 48, 34, 27, 52, 58, 29, 50, 60, 39, 64, 54, 31, 66, 70, 37, 56, 74, 33, 72, 62, 23, 78, 80, 35, 76, 68, 47, 82, 94, 51, 84, 88, 55, 86, 92, 45, 90, 98 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS a(n) = n only for n: 1, 2, 6, 12 for all n < 10000. - Robert G. Wilson v, Nov 21 2012 a(n) = ~(1 +- 2/5)*n. - Robert G. Wilson v, Nov 21 2012 a(n) is odd if and only if n == 1 (mod 3). - Robert Israel, Dec 09 2015 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 LINKS Robert Israel, Table of n, a(n) for n = 1..10000 EXAMPLE After 8 and 6 the next term is 3 as 8+6+3 = 17 is a prime. MAPLE N:= 200: # to get all terms before the first > N V:= Vector(N): V[1]:= 1: V[2]:= 1: A[1]:= 1: A[2]:= 2: m0:= 3: m:= 0: for n from 3 while m <= N do    t:= A[n-1]+A[n-2];    m1:= m0 + (m0+t+1 mod 2);    for m from m1 to N by 2 do if isprime(m+t) and V[m] = 0 then        A[n]:= m;        V[m]:= 1;        break;    fi od:    if m = m0 then        while m0 < N and V[m0] = 1  do m0:= m0+1 od:    fi; od: seq(A[j], j=1..n-2); # Robert Israel, Dec 09 2015 MATHEMATICA 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 *) PROG (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<

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 22 17:14 EST 2020. Contains 332140 sequences. (Running on oeis4.)