[go: up one dir, main page]

login
For all n >= 0, exactly five sums are prime among a(n+i) + a(n+j), 0 <= i < j < 5; lexicographically earliest such sequence of distinct nonnegative numbers.
2

%I #8 Jan 07 2022 19:35:45

%S 0,1,2,3,6,5,8,11,7,12,29,18,19,4,13,9,22,10,21,14,57,16,15,17,26,27,

%T 20,23,33,34,38,45,25,28,51,46,31,43,58,30,24,37,49,35,36,102,47,42,

%U 55,32,41,48,65,39,62,44,40,63,69,50,68,59,80,71,54,77,60,53,56,74,75

%N For all n >= 0, exactly five sums are prime among a(n+i) + a(n+j), 0 <= i < j < 5; lexicographically earliest such sequence of distinct nonnegative numbers.

%C That is, there are 5 primes, counted with multiplicity, among the 10 pairwise sums of any 5 consecutive terms.

%C Conjectured to be a permutation of the nonnegative integers.

%C If so, then the restriction to [1..oo) is a permutation of the positive integers, but not the smallest such, which is given in A329563. It seems that the two sequences have no common terms beyond a(6) = 8, except for the accidental a(22) = 15 and maybe some later coincidences of this type. There also appears to be no other simple relation between the terms of these sequences, in contrast to, e.g., A055265 vs. A128280. - _M. F. Hasler_, Feb 12 2020

%H M. F. Hasler, <a href="/wiki/User:M._F._Hasler/Prime_sums_from_neighboring_terms">Prime sums from neighboring terms</a>, OEIS wiki, Nov. 23, 2019

%e For n = 0, we consider pairwise sums among the first 5 terms a(0..4), among which we must have 5 primes. To get a(4), consider first a(0..3) = (0, 1, 2, 3) and the pairwise sums (a(i) + a(j), 0 <= i < j <= 3) = (1; 2, 3; 3, 4, 5) among which there are 4 primes, counted with multiplicity (i.e., the prime 3 is there two times). So the additional term a(4) must give exactly one more prime sum with all of a(0..3). We find that 4 or 5 would give two more primes, but a(4) = 6 gives exactly one more, 1 + 6 = 7.

%e Now, for n = 1 we forget the initial 0 and consider the pairwise sums of the remaining terms {1, 2, 3, 6}. There are 3 prime sums, so the next term must give two more. The term 4 would give two more (1+4 and 3+4) primes, but thereafter we would have {2, 3, 6, 4} with only 2 prime sums and impossibility to add one term to get three more prime sums: 2+x, 6+x and 4+x can't be all prime for x > 1.

%e Therefore 4 isn't the next term, and we try a(5) = 5 which indeed gives the required number of primes, and also allows us to continue.

%o (PARI) {A329564(n,show=1,o=0,N=5,M=4,X=[[4,4]],p=[],u,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<M&&sum(i=1,#p,isprime(p[i]+u))<=c,o=u)|| for(k=u,oo,bittest(U,k-u)|| sum(i=1,#p,isprime(p[i]+k))!=c|| setsearch(X,[n,k])|| [o=k,break]));show&&print([u]);o} \\ optional args: show=1: print a(o..n-1), show=-1: append them on global list L, in both cases print [least unused number] at the end. See the wiki page for a function S() which returns a vector: a(0..n-1) = S(5,5;0).

%Y Cf. A329425 (6 primes using 5 consecutive terms).

%Y Cf. A055266 & A253074 (0 primes using 2 terms), A329405 & A329450 (0 primes using 3 terms), A055265 & A128280 (1 prime using 2 terms), A329333, A329406 - A329410 (1 prime using 3, ..., 10 terms), A329411 - A329416 and A329452, A329453 (2 primes using 3, ..., 10 terms), A329454 & A329455 (3 primes using 4 resp. 5 terms), A329449 & A329456 (4 primes using 4 resp. 5 terms), A329568 & A329569 (9 primes using 6 terms), A329572 & A329573 (12 primes using 7 terms), A329563 - A329581: other variants.

%K nonn

%O 0,3

%A _M. F. Hasler_, Feb 09 2020