OFFSET
1,2
COMMENTS
Conjectured to be a permutation of the positive integers: a(10^5) = 10^5, a(10^6) = 999984 and all numbers below 99992 resp. 999963 have appeared by then. See A329452 for a more detailed discussion. - M. F. Hasler, Nov 15 2019
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 1 is the smallest possible choice; there are no other restrictions so far.
a(2) = 2 as 2 is the smallest available integer not leading to a contradiction. Note that as 1 + 2 = 3 we already have one prime sum (of the required two) with the quadruplet {1, 2, a(3), a(4)}.
a(3) = 3 as 3 is the smallest available integer not leading to a contradiction. Note that as 2 + 3 = 5 we now have the two prime sums required with the quadruplet {1,2,5,a(4)}.
a(4) = 7 as a(4) = 4, 5 or 6 would lead to a contradiction: indeed, both the quadruplets {1, 2, 3, 4}, {1, 2, 3, 5} and {1, 2, 3, 6} will produce three prime sums (instead of two). With a(4) = 7 we have the quadruplet {1, 2, 3, 7} and the two prime sums we are looking for: 1 + 2 = 3 and 2 + 3 = 5.
a(5) = 5 as a(5) = 4 would again lead to a contradiction: indeed, the quadruplet {2, 3, 7, 4} will produce three prime sums (instead of two, they would be 2 + 3 = 5; 3 + 4 = 7 and 7 + 4 = 11). With a(5) = 5 the quadruplet {2, 3, 7, 4} shows exactly the two prime sums we are looking for: 2 + 3 = 5 and 3 + 4 = 7.
And so on.
PROG
(PARI) A329412(n, show=0, o=1, 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(2<#p, p[^1], p), o); my(c=2-sum(i=2, #p, sum(j=1, i-1, isprime(p[i]+p[j])))); if(#p<3, o=u; next); for(k=u, oo, bittest(U, k-u) || sum(i=1, #p, isprime(p[i]+k))!=c || [o=k, break])); o} \\ Optional args: show=1: print a(o..n-1); o=0: start with a(0)=0 (A329452). - M. F. Hasler, Nov 15 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Nov 14 2019
STATUS
approved