[go: up one dir, main page]

login
Search: a329580 -id:a329580
     Sort: relevance | references | number | modified | created      Format: long | short | data
For any n >= 0, exactly four sums a(n+i) + a(n+j) are prime, for 0 <= i < j <= 3: lexicographically earliest such sequence of distinct nonnegative integers.
+10
22
0, 1, 2, 3, 4, 9, 8, 15, 14, 5, 26, 17, 6, 11, 12, 7, 30, 29, 24, 13, 18, 19, 10, 43, 28, 31, 16, 25, 22, 21, 46, 37, 52, 27, 34, 45, 44, 39, 58, 69, 20, 51, 32, 41, 38, 35, 48, 23, 36, 53, 50, 47, 54, 59, 42, 55, 72, 65, 84, 67, 114, 79, 60, 49, 78, 71, 102, 61, 66, 91, 40, 73, 76, 33, 64, 63, 68
OFFSET
0,3
COMMENTS
That is, there are exactly four primes (counted with multiplicity) among the 6 pairwise sums of any four consecutive terms. This is the theoretical maximum: there can't be a sequence with more than 4 prime sums in any 4 consecutive terms, see the wiki page for details.
This map is defined with offset 0 as to have a permutation of the nonnegative integers in case each of these eventually appears, which is so far only conjectured, see below. The restriction to positive indices would then be a permutation of the positive integers, and as it happens, also the smallest one with the given property. (This is in contrast to most other cases where that one is not the restriction of the other one: see crossrefs).
Concerning the existence of the sequence with infinite length: If the sequence is to be computed in a greedy manner, this means that for given P(n) := {a(n-1), a(n-2), a(n-3)} and thus 0 <= N(n) := #{ primes x + y with x, y in P(n), x < y} <= 4, we have to find a(n) such that we have exactly 4 - N(n) primes in a(n) + N(n). It is easy to prove that this is always possible when 4 - N(n) = 0 or 1. Otherwise, similar to A329452, ..., A329456, we see that P(n) is an "admissible constellation" in the sense that a(n-4) + P(n) already gave the number of primes required now. So a weaker variant of the k-tuple conjecture would ensure we can find this a(n). But the sequence need not be computable in greedy manner! That is, if ever for given P(n) no a(n) would exist such that a(n) + P(n) contains 4 - N(n) primes, this simply means that the considered value of a(n-1) (and possibly a(n-2)) was incorrect, and the next larger choice has to be made. Given this freedom, there is no doubt that this sequence is well defined up to infinity.
Concerning surjectivity: If a number m would never appear, this means that m + P(n) will never have the required number of 4 - N(n) primes for all n with a(n) > m, in spite of having found for each of these n at least two other solutions, a(n-4) + P(n) and a(n) + P(n) which both gave 4 - N(n) primes. This appears extremely unlikely and thus as strong evidence in favor of surjectivity.
See examples for further computational evidence.
LINKS
Eric Angelini, Prime sums from neighbouring terms, personal blog "Cinquante signes" (and post to the SeqFan list), Nov. 11, 2019.
M. F. Hasler, Prime sums from neighboring terms, OEIS Wiki, Nov. 23, 2019.
EXAMPLE
We start with a(0) = 0, a(1) = 1, a(2) = 2, a(3) = 3, the smallest possibilities which do not lead to a contradiction. Indeed, the four sums 0 + 2, 0 + 3, 1 + 2 and 2 + 3 are prime.
Now we have 2 prime sums using {1, 2, 3}, so the next term must give two more prime when added to these. We find that a(4) = 4 is the smallest possible choice, with 1 + 4 = 5 and 3 + 4 = 7.
Then there are again 2 primes among the pairwise sums using {2, 3, 4}, so the next term must again produce two more prime sums. We find that a(5) = 9 is the smallest possibility, with 2 + 9 = 11 and 4 + 9 = 13.
a(10^4) = 9834 and all numbers up to 9834 occurred by then.
a(10^5) = 99840 and all numbers below 99777 occurred by then.
a(10^6) = 1000144 and all numbers below 999402 occurred by then.
PROG
(PARI) A329449(n, show=0, o=0, N=4, M=3, p=[], U, u=o)={for(n=o, n-1, if(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])))); for(k=u, oo, bittest(U, k-u) || min(c-#[0|p<-p, isprime(p+k)], #p>=M) || [o=k, break])); show&&print([u]); o} \\ Optional args: show=1: print a(o..n-1), show=-1: append a(o..n-1) to the global list L, in both cases print [least unused number] at the end; o=1: start with a(1)=1; N, M: get N primes using M+1 consecutive terms.
CROSSREFS
Other sequences with N primes among pairwise sums of M consecutive terms, starting with a(o) = o, sorted by decreasing N and lowest possible M: A329581 (N=11, M=8, o=0), A329580 (N=10, M=8, o=0), A329569 (N=9, M=6, o=0), A329568 (N=9, M=6, o=1), A329425 (N=6, M=5, o=0), A329449 (N=4, M=4, o=0), A329411 (N=2, M=3, o=0 or 1), A128280 (N=1, M=2, o=0), A055265 (N=1, M=2, o=1), A055266 (N=0, M=2; o=1), A253074 (N=0, M=2; o=0).
For other variants see A329333 (N=1, M=3; o=0/1), A329405 (0,3;1) .. A329417 (3,4;1), A329449 (4,4;0) .. A329580 (10,8;0).
KEYWORD
nonn
AUTHOR
M. F. Hasler, based on an idea from Eric Angelini, Nov 15 2019
STATUS
approved
For any n >= 0, exactly four sums a(n+i) + a(n+j) are prime, for 0 <= i < j <= 4: lexicographically earliest such sequence of distinct nonnegative integers.
+10
13
0, 1, 2, 3, 24, 4, 5, 7, 8, 6, 9, 10, 11, 13, 18, 12, 16, 19, 29, 25, 42, 14, 15, 17, 20, 21, 22, 23, 26, 38, 45, 27, 28, 33, 40, 32, 31, 39, 30, 41, 48, 49, 36, 35, 34, 37, 43, 66, 47, 50, 46, 51, 52, 53, 55, 54, 44, 56, 83, 63, 59, 68, 64, 67, 72, 85, 57, 70, 79, 78, 58, 60, 61, 121, 76, 71, 90, 73
OFFSET
0,3
COMMENTS
That is, there are exactly four primes (counted with multiplicity) among the 10 pairwise sums of any five consecutive terms. (It is possible to have 4 primes among the pairwise sums of any 4 consecutive elements, see A329449.)
This map is defined with offset 0 so as to have a permutation of the nonnegative integers in case each of these eventually appears, which is not yet proved (cf. below). The restriction to positive indices would then be a permutation of the positive integers with the same property, but not the lexicographically earliest such, which starts (1, 2, 3, 4, 23, 8, 5, 6, 10, 7, 9, 11, 12, ...).
Concerning the existence of the sequence with infinite length: If the sequence is to be computed in a greedy manner, this means that for given P(n) := {a(n-1), a(n-2), a(n-3), a(n-4)} and thus N(n) := #{ primes x + y with x, y in P(n), x < y} in {0, ..., 4}, we have to find a(n) such that we have exactly 4 - N(n) primes in a(n) + N(n). It is easy to prove that this is always possible when 4 - N(n) = 0 or 1. Otherwise, similar to A329452, ..., A329455, we see that P(n) is an "admissible constellation" in the sense that a(n-5) + P(n) already gave the number of primes required now. So a (weaker) variant of the k-tuple conjecture ensures we can find this a(n). But the sequence need not be computable in greedy manner! That is, if ever for given P(n) no convenient a(n) would exist, this just means that the considered value of a(n-1) (and possibly a(n-2)) was incorrect, and the next larger choice has to be made. Given this freedom, there is no doubt that this sequence is well defined up to infinity.
Concerning surjectivity: If a number m would never appear, this means that m + P(n) will never have the required number of 4 - N(n) primes for all n with a(n) > m, in spite of having found for each of these n at least two other solutions, a(n-4) + P(n) and a(n) + P(n) which both gave 4 - N(n) primes. This appears extremely unlikely and thus as strong evidence in favor of surjectivity.
See examples for further computational evidence.
LINKS
Eric Angelini, Prime sums from neighbouring terms, personal blog "Cinquante signes" (and post to the SeqFan list), Nov. 11, 2019.
EXAMPLE
We start with a(0) = 0, a(1) = 1, a(2) = 2, a(3) = 3, the smallest possibilities which do not lead to a contradiction. Indeed, the four sums 0 + 2, 0 + 3, 1 + 2 and 2 + 3 are prime.
Now the next term must not give an additional prime when added to any of {0, 1, 2, 3}. We find that a(4) = 24 is the smallest possible choice.
Then there are 2 primes (1+2, 2+3) among the pairwise sums using {1, 2, 3, 24}, so the next term must produce two more prime sums. We find that a(5) = 4 is correct, with 1+4 and 3+4.
a(10^5) = 99948.
a(10^6) = 999923 and all numbers below 999904 occurred by then.
PROG
(PARI) A329455(n, show=0, o=0, N=4, M=4, p=[], U, u=o)={for(n=o, n-1, show>0&& 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<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 || [o=k, break])); show&&print([u]); o} \\ Optional args: show=1: print a(o..n-1), show=-1: print only [least unused number] at the end; o=1: start with a(1)=1; N, M: get N primes using M+1 consecutive terms.
CROSSREFS
Other sequences with N primes among pairwise sums of M consecutive terms, starting with a(o) = o, sorted by decreasing N: A329581 (N=11, M=8, o=0), A329580 (N=10, M=8, o=0), A329579 (N=9, M=7, o=0), A329577 (N=7, M=7, o=0), A329566 (N=6, M=6, o=0), A329449 (N=4, M=4, o=0), this A329456 (N=4, M=5, o=0), A329454 (3, 4, 0), A329455 (3, 5, 0), A329411 (2, 3, o=1 and 0), A329452 (2, 4, 0), A329412 (2, 4, 1), A329453 (2, 5, 0), A329413 (2, 5, 1), A329333 (N=1, M=3, o=0 and 1), A329450 (0, 3, 0), A329405 (0, 3, 1).
KEYWORD
nonn
AUTHOR
M. F. Hasler, based on an idea from Eric Angelini, Nov 15 2019
STATUS
approved
For every n >= 0, exactly 11 sums are prime among a(n+i) + a(n+j), 0 <= i < j < 8: lexicographically earliest such sequence of distinct nonnegative numbers.
+10
13
0, 1, 2, 3, 4, 5, 6, 20, 9, 8, 11, 23, 7, 10, 21, 50, 30, 36, 17, 31, 37, 16, 12, 14, 25, 42, 22, 67, 15, 19, 28, 13, 34, 18, 40, 24, 41, 139, 27, 49, 43, 60, 124, 52, 26, 57, 75, 87, 32, 48, 35, 44, 92, 39, 29, 38, 45, 33, 59, 98, 64, 51, 46, 218, 53, 93, 58, 56, 47, 135, 54, 134, 55, 95, 72, 62, 65, 85
OFFSET
0,3
COMMENTS
That is, there are 11 primes, counted with multiplicity, among the 28 pairwise sums of any 8 consecutive terms.
Is this a permutation of the nonnegative integers?
If so, then the restriction to [1..oo) is a permutation of the positive integers, but not the lexicographically earliest one with this property, which starts (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 24, 23, 30, 29, 14, ...).
LINKS
M. F. Hasler, Prime sums from neighboring terms, OEIS wiki, Nov. 23, 2019
EXAMPLE
In P(7) := {0, 1, 2, 3, 4, 5, 6} there are already S(7) := 10 primes 0+2, 0+3, 0+5, 1+2, 1+4, 1+6, 2+3, 2+5, 3+4, 5+6 among the pairwise sums, so the next term a(7) must produce exactly one more prime when added to elements of P(7). We find that a(7) = 20 is the smallest possible term (with 20 + 3 = 23).
Then in P(8) = {1, 2, 3, 4, 5, 6, 20} there are S(8) = 8 primes among the pairwise sums, so a(8) must produce exactly 3 more primes when added to elements of P(8). We find a(8) = 9 is the smallest possibility (with 2+9, 4+9 and 20+9).
And so on.
PROG
(PARI) A329581(n, show=0, o=0, N=11, M=7, p=[], U, u=o)={for(n=o, n-1, if(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||[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; o=1: start at a(1)=1; N, M: find N primes using M+1 terms
CROSSREFS
Cf. A329580 (10 primes using 8 consecutive terms), A329579 (9 primes using 7 consecutive terms), A329425 (6 primes using 5 consecutive terms).
Cf. A329455 (4 primes using 5 consecutive terms), A329455 (3 primes using 5 consecutive terms), A329453 (2 primes using 5 consecutive terms), A329452 (2 primes using 4 consecutive terms).
Cf. A329577 (7 primes using 7 consecutive terms), A329566 (6 primes using 6 consecutive terms), A329449 (4 primes using 4 consecutive terms).
Cf. A329454 (3 primes using 4 consecutive terms), A329411 (2 primes using 3 consecutive terms), A329333 (1 odd prime using 3 terms), A329450 (0 primes using 3 terms).
Cf. A329405 ff: other variants defined for positive integers.
KEYWORD
nonn
AUTHOR
M. F. Hasler, Nov 17 2019
STATUS
approved

Search completed in 0.008 seconds