cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-17 of 17 results.

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

Original entry on oeis.org

0, 1, 2, 5, 6, 11, 12, 17, 26, 35, 36, 47, 24, 54, 77, 7, 43, 60, 13, 30, 96, 4, 67, 97, 16, 133, 34, 3, 40, 27, 63, 100, 10, 20, 171, 9, 8, 51, 21, 22, 52, 15, 32, 38, 75, 141, 56, 41, 71, 122, 152, 45, 68, 29, 59, 14, 39, 44, 50, 23, 53, 57, 74, 107, 170, 176, 93, 134, 137, 86, 177, 65, 476, 62, 87, 92, 101
Offset: 0

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Comments

That is, there are 12 primes, counted with multiplicity, among the 21 pairwise sums of any 7 consecutive terms.
This is the theoretical maximum: there can't be more than 12 primes in pairwise sums of 7 distinct numbers > 1. See the wiki page for more details.
Conjectured to be a permutation of the nonnegative integers. See A329573 for the "positive" variant: same definition but with offset 1 and positive terms, leading to a quite different sequence.
For a(3) and a(4) resp. a(5) one must forbid the values < 5 resp. < 11 which would be the greedy choices, in order to get a solution for a(7), but from then on, the greedy choice gives the correct solution, at least for several hundred terms.

Crossrefs

Cf. A055273 (analog starting with a(1) = 1), A055265 & A128280 (1 prime using 2 terms), A055266 & A253074 (0 primes using 2 terms), A329405 - A329416, A329425, A329333, A329449 - A329456, A329563 - A329581.

Programs

  • PARI
    {A329572(n,show=0,o=0,N=12,M=6,D=[3,5,4,6,5,11],p=[],u=o,U)=for(n=o+1,n, 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); D&& D[1]==n&& [o=D[2],D=D[3..-1]]&& next; 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 them on global list L, in both cases print [least unused number] at the end. See the wiki page for more.

A329573 For all n >= 1, exactly 12 sums are prime among a(n+i) + a(n+j), 0 <= i < j < 7; lexicographically earliest such sequence of distinct positive numbers.

Original entry on oeis.org

1, 2, 3, 4, 9, 10, 27, 14, 20, 33, 34, 69, 39, 28, 40, 13, 19, 70, 31, 43, 180, 220, 61, 36, 66, 91, 127, 7, 12, 5, 102, 186, 11, 6, 25, 18, 55, 41, 42, 48, 65, 72, 59, 38, 125, 24, 29, 35, 54, 32, 47, 77, 164, 26, 407, 15, 116, 63, 75, 404, 416, 8, 215, 45, 56, 183, 23, 134, 206, 17, 44, 50
Offset: 1

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Comments

That is, there are 12 primes, counted with multiplicity, among the 21 pairwise sums of any 7 consecutive terms.
This is the theoretical maximum: there can't be more than 12 primes in pairwise sums of 7 distinct numbers > 1. See the wiki page for more details.
Conjectured to be a permutation of the positive integers. See A329572 for the nonnegative variant (same definition but with n >= 0 and terms >= 0), leading to a quite different sequence.
For a(5) and a(6) one must forbid values up to 8 in order to be able to find a solution for a(7), but from then on, the greedy choice gives the correct solution, at least for several hundred terms. Small values appearing late are a(30) = 5, a(34) = 6, a(28) = 7, a(62) = 8.

Examples

			Up to and including the 6th term, there is no constraint other than not using a term more than once, since it is impossible to have more than 12 primes as pairwise sums of 6 numbers. So one would first try to use the lexicographically smallest possible choice a(1..6) =?= (1, 2, ..., 6). But then one would have only 7 pairs (i,j) such that a(i) + a(j) is prime, 1 <= i < j <= 6. So one would need 12 - 7 = 5 more primes in {1, 2, ..., 6} + a(7), which is impossible. One can check that even a(1..5) =?= (1,...,5) does not allow one to find a(6) and a(7) in order to have 12 prime sums a(i) + a(j), 1 <= i < j <= 7. Nor is it possible to find a solution with a(5) equal to 6 or 7 or 8. One finds that a(5) = 9, and a(6) = 10, are the smallest possible choices for which a(7) can be found as to satisfy the requirement. In that case, a(7) = 27 is the smallest possible solution, which yields the 12 prime sums 1+2, 2+3, 1+4, 3+4, 2+9, 4+9, 1+10, 3+10, 9+10, 2+27, 4+27, 10+27.
Now, to satisfy the definition of the sequence for n = 2, we drop the initial 1 from the set of consecutive terms, and search for a(8) producing the same number of additional primes together with {2, 3, 4, 9, 10, 27} as did a(1) = 1, namely 3. We see that a(8) = 14 is the smallest possibility. And so on.
It seems that once a(5) and a(6) are chosen, one may always take the smallest possible choice for the next term without ever again running into difficulty. This is in strong contrast to the (exceptional) case of the variant where we require 10 prime sums among 7 consecutive terms, cf. sequence A329574.
		

Crossrefs

Cf. A055272 (analog starting with a(0)=0), A055265 & A128280 (1 prime using 2 terms), A055266 & A253074 (0 primes using 2 terms), A329405 - A329416, A329425, A329333, A329449 - A329456, A329563 - A329581.

Programs

  • PARI
    {A329573(n,show=0,o=1,N=12,M=6,D=[5,9,6,10],p=[],u=o,U)=for(n=o+1,n, 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); D&& D[1]==n&& [o=D[2],D=D[3..-1]]&& next; 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 them on global list L, in both cases print [least unused number] at the end. See the wiki page for more.

A329564 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.

Original entry on oeis.org

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, 20, 23, 33, 34, 38, 45, 25, 28, 51, 46, 31, 43, 58, 30, 24, 37, 49, 35, 36, 102, 47, 42, 55, 32, 41, 48, 65, 39, 62, 44, 40, 63, 69, 50, 68, 59, 80, 71, 54, 77, 60, 53, 56, 74, 75
Offset: 0

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Comments

That is, there are 5 primes, counted with multiplicity, among the 10 pairwise sums of any 5 consecutive terms.
Conjectured to be a permutation of the nonnegative integers.
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

Examples

			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.
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.
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.
		

Crossrefs

Cf. A329425 (6 primes using 5 consecutive terms).
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.

Programs

  • 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
    				

A329574 For every n >= 0, exactly 10 sums are prime among a(n+i) + a(n+j), 0 <= i < j < 7; lexicographically earliest such sequence of distinct nonnegative numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 8, 9, 10, 14, 33, 15, 20, 27, 26, 11, 32, 16, 41, 21, 57, 116, 22, 51, 38, 23, 50, 63, 86, 6, 17, 24, 77, 65, 18, 13, 114, 25, 36, 28, 35, 43, 12, 31, 61, 66, 40, 19, 47, 42, 90, 241, 7, 52, 37, 34, 45, 30, 55, 49, 394, 58, 73, 39, 48, 64, 109, 115
Offset: 0

Views

Author

M. F. Hasler, Feb 10 2020

Keywords

Comments

That is, there are 10 primes, counted with multiplicity, among the 21 pairwise sums of any 7 consecutive terms.
Conjectured to be a permutation of the nonnegative integers.
If it is, then the restriction to [1..oo) is a permutation of the positive integers, but maybe not the lexicographically earliest one with this property.
This is the first example of a sequence of this type for which the greedy choice of a(n) is frequently incorrect beyond the initial terms, see Examples.

Examples

			At the beginning of the sequence, we must avoid the choice of 6 or 7 for a(6): both appear to be possible at first sight, giving exactly 10 prime sums with n = 0 in the definition, but then make it impossible to find a successor term a(7) for which the definition is satisfied with n = 1.
The same happens again for a(37) and a(58), where the apparently possible value 19 resp. 46 must be avoided.
		

Crossrefs

Cf. A055265, A128280 (1 prime from 2 terms), A329333 (1 prime from 3 terms), A329405, ..., A329416 (N primes from M terms >= 1), A329425, A329449, ..., A329581 (N primes from M terms >= 0).

Programs

  • PARI
    {A329574(n, show=0, o=0, N=10, M=6, X=[[6,6],[6,7],[37,19],[58,46]], p=[], u=o, U)=for(n=o+1, n, 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|x<-p, isprime(x+k)], #p>=M)|| 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. Parameters N, M, o, ... allow getting other variants, see the wiki page for more.

A329576 For all n >= 1, exactly seven sums are prime among a(n+i) + a(n+j), 0 <= i < j < 6; lexicographically earliest such sequence of distinct positive numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 11, 26, 15, 9, 14, 32, 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
Offset: 1

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Comments

That is, there are 7 primes, counted with multiplicity, among the 15 pairwise sums of any 6 consecutive terms.
Conjectured to be a permutation of the positive integers.

Examples

			For n = 1, we must forbid the greedy choice for a(6) which would be 6, which leads to a dead end: there is no possibility to find a subsequent term that would give 7 prime sums together with {2, 3, 4, 5, 6}. If we take the next larger possibility, a(6) = 8, then it works for the next and all subsequent terms.
		

Crossrefs

Cf. A329425 (6 primes using 5 consecutive terms), A329566 (6 primes using 6 consecutive terms).
Cf. A329449 (4 primes using 4 consecutive terms), A329456 (4 primes using 5 consecutive terms).
Cf. A329454 (3 primes using 4 consecutive terms), A329455 (3 primes using 5 consecutive terms).
Cf. A329411 (2 primes using 3 consecutive terms), A329452 (2 primes using 4 consecutive terms), A329453 (2 primes using 5 consecutive terms).
Cf. A329333 (1 (odd) prime using 3 terms), A128280 & A055265 (1 prime using 2 terms); A055266 & A253074 (0 primes using 2 terms), A329405 & A329450 (0 primes using 3 terms), A329406 - A329416, A329563 - A329581: other variants.

Programs

  • PARI
    {A329576(n,show=1,o=1,N=7,M=5,X=[[6,6]],p=[],u=o,U)=for(n=o+1,n, 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
    				

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

Original entry on oeis.org

0, 1, 2, 3, 6, 24, 4, 5, 8, 9, 10, 11, 7, 13, 12, 17, 16, 14, 15, 19, 22, 18, 21, 20, 26, 23, 25, 27, 33, 34, 28, 29, 32, 38, 39, 30, 31, 41, 40, 36, 35, 42, 61, 44, 43, 66, 37, 52, 45, 47, 46, 51, 50, 57, 48, 49, 53, 55, 56, 59, 54, 58, 72, 95, 62, 65, 67, 63, 84, 64, 60, 68, 89, 71, 69, 73, 80, 78, 70, 79, 87, 76, 75, 74, 88, 77, 81, 82, 189, 85
Offset: 0

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Comments

That is, there are 5 primes, counted with multiplicity, among the 15 pairwise sums of any 6 consecutive terms.
Conjectured to be a permutation of the nonnegative integers.
If so, then the restriction to [1..oo) is a permutation of the positive integers.

Examples

			For n = 0, we consider pairwise sums of the first 6 terms a(0..5) = (0, 1, 2, 3, 6, 24): We have (a(i) + a(j), 0 <= i < j < 6) = (1; 2, 3; 3, 4, 5; 6, 7, 8, 9; 24, 25, 26, 27, 30) among which there are 5 primes, counted with repetition. If one tries to take a(4) equal to 4 or 5, this yields already 6 primes among the pairwise sums of the first 5 terms, so the smallest possible choice is a(4) = 6, and thereafter any a(5) less than 24 would again yield too many prime sums. So (0, 1, 2, 3, 6, 24) is indeed the start of the lexicographically earliest nonnegative sequence with the required properties.
Then one finds that a(6) = 4 is possible, giving also 6 prime sums for n = 1, so this is the correct continuation (modulo later confirmation that the sequence can be continued without contradiction given this choice).
Next one finds that a(7) = 5 is also possible, and so on.
		

Crossrefs

Cf. A329425 (6 primes using 5 consecutive terms), A329566 (6 primes using 6 consecutive terms).
Cf. A329449 (4 primes using 4 consecutive terms), A329456 (4 primes using 5 consecutive terms).
Cf. A329454 (3 primes using 4 consecutive terms), A329455 (3 primes using 5 consecutive terms).
Cf. A329411 (2 primes using 3 consecutive terms), A329452 (2 primes using 4 consecutive terms), A329453 (2 primes using 5 consecutive terms).
Cf. A329333 (1 (odd) prime using 3 terms), A128280 & A055265 (1 prime using 2 terms); A055266 & A253074 (0 primes using 2 terms), A329405 & A329450 (0 primes using 3 terms), A329406 ff: other variants.

Programs

  • PARI
    {A329565(n,show=0,o=0,N=5/*#primes*/,M=5,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
    				

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.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Comments

That is, there are 7 primes, counted with multiplicity, among the 15 pairwise sums of any 6 consecutive terms.
Conjectured to be a permutation of the nonnegative integers. The restriction to [1,oo) is then a permutation of the positive integers with the same property, but not the smallest one which is A329576 = (1, 2, 3, 4, 5, 8, 11, ...).
For n > 5, a(n) is the smallest number not used earlier such that the set a(n) + {a(n-5), ..., a(n-1)} has the same number of primes as a(n-6) + {a(n-5), ..., a(n-1)}. Such a number always exists, by definition of the sequence. (If it would not exist for a given n, this means the term a(n-1) (or earlier) "was wrong and must be corrected", so to say. Of course this only refers to an incorrect computation.)

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.
		

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
    				
Previous Showing 11-17 of 17 results.