A329567 For all n >= 0, exactly seven sums are prime among a(n+i) + a(n+j), 0 <= i < j < 6: lexicographically earliest such sequence of distinct nonnegative numbers.
0, 1, 2, 3, 4, 8, 5, 11, 26, 15, 9, 32, 14, 17, 20, 21, 27, 10, 16, 19, 7, 12, 13, 24, 6, 23, 35, 25, 37, 18, 36, 22, 31, 61, 28, 30, 39, 40, 43, 33, 64, 38, 45, 34, 29, 63, 50, 44, 53, 42, 59, 47, 54, 48, 41, 90, 49, 55, 52, 108, 58, 46, 51, 121, 73, 78, 76, 100, 79, 81, 151, 60, 67, 112, 70, 69, 82, 62, 87, 57, 80, 111, 56, 71, 66, 68, 86, 83, 65
Offset: 0
Keywords
Examples
Using the smallest possible 5 initial terms a(0..4) = (0, 1, 2, 3, 4), we have a total of 6 primes among the pairwise sums, namely 0+2, 0+3, 1+2, 1+4, 2+3 and 3+4. To satisfy the definition for n = 0, the next term a(5) must give exactly one more prime when added to these 5 initial terms. The smallest number with this property is 6, but this choice of a(5) would make it impossible to find a suitable a(7): Indeed, for n = 1 we must consider the pairwise sums of (1, 2, 3, 4, a(5), a(6)). If we had (1, 2, 3, 4, 6, a(6)), the first 5 terms would give 5 prime sums 1+2, 1+4, 1+6, 2+3 and 3+4. Then a(6) should give two more prime sums, which is easily possible, either with even a(6) such that 1+a(6) and 3+a(6) are prime, or odd a(6) such that two among {2, 4, 6} + a(6) are prime. Thereafter, for n = 2, we drop the 1 and include a(7) instead, which must produce the same number of prime sums when added to {2, 3, 4, 6, a(6)} as was the case for 1. For even a(6) this was 4 (1+2, 1+4, 1+6 and 1+a(6)), which is impossible to achieve with a(7) > 1, since 2+x, 4+x and 6+x can't be all prime for x > 1. For odd a(6) it is 3 (1+2, 1+4 and 1+6), which is also impossible as well for odd a(7) (same reason as before) as for even a(7) (since only 3 and a(6) are odd and can give a prime sum). This shows that we can't take a(5) equal to 6, and must consider the next larger possibility, which is a(5) = 8 (with prime sum 3+8 = 11, while 7 would give more than one, 0+7 and 4+7). Now we find that the smallest possible a(6) = 5 yields a solution and all subsequent terms can also be chosen greedily.
Links
- Éric Angelini, Prime sums from neighbouring terms, SeqFan list, Nov 11 2019.
- Éric Angelini, Prime sums from neighbouring terms, SeqFan list, Nov 11 2019. [Cached copy, with permission]
- Eric Angelini, Prime sums from neighbouring terms, personal blog "Cinquante signes" [Cached copy of html file, with permission]
- Eric Angelini, Prime sums from neighbouring terms, personal blog "Cinquante signes" [Cached copy of pdf file, with permission]
- M. F. Hasler, Prime sums from neighboring terms, OEIS wiki, Nov. 23, 2019.
Crossrefs
Cf. related sequences with N prime sums using M consecutive terms, labeled (N,M): A329425 (6,5), A329566 (6,6), A329449 (4,4), A329456 (4,5), A329454 & A329416 (3,4), A329455 (3,5), A329411 (2,3), A329452 (2,4), A329453 (2,5), A329333 (1,3), A128280 & A055265 (1,2); A055266 & A253074 (0,2), A329405 & A329450 (0,3), A329406 - A329416: (1,4) ... (2,10).
Programs
-
PARI
{A329567(n,show=1,o=0,N=7,M=5,X=[[4,6]],p=[],u=o,U)=for(n=o,n-1, show>0&& print1(o","); show<0&& listput(L,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