A073653 a(1)=3, a(2)=5; for n > 2, a(n) = smallest prime not included earlier such that a(n-2) + a(n-1) + a(n) is a prime.
3, 5, 11, 7, 13, 17, 23, 19, 29, 31, 37, 41, 53, 43, 61, 47, 59, 67, 71, 73, 79, 89, 83, 97, 101, 109, 103, 137, 107, 139, 113, 127, 149, 157, 151, 131, 167, 163, 173, 211, 179, 181, 197, 191, 199, 223, 239, 229, 193, 251, 233, 277, 241, 269, 263, 307, 227, 293
Offset: 1
Keywords
Examples
a(3)=11 because 3 + 5 + 7 = 15 is composite and 3 + 5 + 11 = 19 is prime.
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A073654.
Programs
-
Mathematica
f[s_List] := Block[{p = s[[-2]] + s[[-1]], q = 7}, While[ !PrimeQ[p + q] || MemberQ[s, q], q = NextPrime[q]]; Append[s, q]]; Nest[f, {3, 5}, 56] (* Robert G. Wilson v, Mar 19 2012 *)
Extensions
More terms from Sascha Kurz, Jan 28 2003
Comments