A329454 There are exactly three primes among a(n+i) + a(n+j), 0 <= i < j <= 3, for any n >= 0: lexicographically earliest such sequence of distinct nonnegative integers.
0, 1, 2, 4, 5, 3, 8, 6, 11, 7, 10, 12, 9, 19, 22, 14, 15, 16, 13, 18, 21, 40, 43, 20, 27, 46, 17, 26, 33, 24, 35, 38, 32, 23, 29, 30, 31, 28, 25, 34, 36, 39, 37, 64, 42, 41, 67, 47, 60, 49, 48, 52, 45, 55, 44, 58, 69, 51, 50, 62, 53, 77, 54, 56, 83, 57, 66, 74, 65, 61, 102, 70, 71, 79, 78, 59, 68, 63, 72, 95, 86, 81, 76, 73, 75, 82, 106
Offset: 0
Keywords
Examples
We start with a(0) = 0, a(1) = 1, a(2) = 2, the smallest possibilities which do not lead to a contradiction. Now there are already 2 primes, 0 + 2 and 1 + 2, among the pairwise sums, so the next term must generate exactly one further prime. It appears that a(3) = 4 is the smallest possible choice. Then there are again two primes among the pairwise sums using {1, 2, 4}, and the next term must again produce one additional prime as sum with these. We find that a(4) = 5 is the smallest possibility.
Links
- Eric Angelini, Prime sums from neighbouring terms, personal blog "Cinquante signes" (and post to the SeqFan list), Nov. 11, 2019.
- Eric Angelini, Prime sums from neighbouring terms [Cached copy of html file, with permission]
- Eric Angelini, Prime sums from neighbouring terms [Cached copy of pdf file, with permission]
Crossrefs
Programs
-
Mathematica
Nest[Block[{k = 3}, While[Nand[FreeQ[#, k], Count[Subsets[Append[Take[#, -3], k], {2}], ?(PrimeQ@ Total@ # &)] == 3], k++]; Append[#, k]] &, {0, 1, 2}, 84] (* _Michael De Vlieger, Nov 15 2019 *)
-
PARI
A329454(n, show=0, o=0, N=3, M=3, p=[], U, u=o)={for(n=o, n-1, show&& print1(o", "); U+=1<<(o-u); U>>=-u+u+=valuation(U+1, 2); p=concat(if(#p>=M, p[^1], p), o); my(c=N-sum(i=2, #p, sum(j=1, i-1, isprime(p[i]+p[j])))); if(#p
Comments