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.

Showing 1-4 of 4 results.

A254337 Lexicographically earliest sequence of distinct numbers such that no sum of consecutive terms is prime.

Original entry on oeis.org

0, 1, 8, 6, 10, 14, 12, 4, 20, 16, 24, 18, 22, 28, 26, 34, 30, 32, 36, 40, 42, 46, 38, 44, 52, 48, 54, 50, 58, 56, 62, 64, 60, 66, 68, 72, 70, 74, 80, 76, 78, 86, 82, 84, 90, 92, 94, 88, 98, 96, 104, 100, 102, 108, 110, 112, 114, 106, 116, 122, 118, 120, 124, 126, 130, 132, 134, 128, 138, 136, 142, 140, 144, 146, 148, 150, 154, 152, 156, 158
Offset: 0

Views

Author

M. F. Hasler, Jan 28 2015

Keywords

Comments

In other words, no sum a(i)+a(i+1)+a(i+2)+...+a(n) may be prime. In particular, the sequence may not contain any primes.
I conjecture that the sequence contains all even numbers > 2 and no odd number beyond 1. If so, we must simply ensure that the sum a(1)+...+a(n) is not prime, which is always possible for one of the three consecutive even numbers {2n, 2n+2, 2n+4}. As a consequence, it would follow that a(n) ~ 2n.
Is there even a proof that the smallest odd composite number, 9, does not appear?
The variant A254341 has the additional restriction of alternating parity, which avoids excluding the odd numbers.
The least odd composite number a'(n+1) that could occur as the next term after a(n) and such that sum(a(i),i=k...n)+a'(n+1) is composite for all k <= n is (for n = 0, 1, 2,...): 9, 9, 25, 21, 39, 25, 69, 65, 45, 119, 95, 77, 55, 27, 595, 561, 531, 865, 1519, 1479, 1437, 1391, 1353, 1309, 1257, 1209, 1155, 1105, 1047, 2317, 2255, 2191, 3565, 5719, 13067, 12995, 12925, 12851, 12771, 12695, 12617, 12531, 12449, 12365, 12275, ... The growth of this sequence shows how it is increasingly unlikely that an odd number could occur, since the next possible even term is only about 2n.

Examples

			To explain the beginning of the sequence, observe that starting with the smallest possible terms 0, 1 does not appear to lead to a contradiction (and in fact never does), so we start there.
The next composite would be 4 but 1+4=5 is prime, as is 1+6, but 1+8=9 is not, so we take a(2) = 8 to be the next term.
4 is impossible for a(3) since 1+8+4=13 is prime, but neither 1+8+6=15 nor 8+6 is prime, so a(3)=6.
		

Crossrefs

Cf. A025044 (no pairwise sum is prime), A025043 (no pairwise difference is prime).

Programs

  • Mathematica
    f[lst_List] := Block[{k = 1}, While[ PrimeQ@ k || MemberQ[lst, k] || Union@ PrimeQ@ Accumulate@ Reverse@ Join[lst, {k}] != {False}, k++]; Append[lst, k]]; Nest[f, {0}, 70] (* Robert G. Wilson v, Jan 31 2015 *)
  • PARI
    a=[];u=0; for(i=1,99, a=concat(a,0); until( ! isprime(s) || ! a[i]++, while( isprime(a[i]) || bittest(u,a[i]), a[i]++); s=a[k=i]; while( k>1 && ! isprime( s+=a[k--]),)); u+=2^a[i]; print1(a[i]","))

Formula

It appears that a(n) ~ 2n.

A153136 Smallest sequence of primes such that no sum of at least two terms is prime.

Original entry on oeis.org

2, 7, 13, 43, 103, 1627, 25349, 315743, 7338823, 42939980423
Offset: 1

Views

Author

Benoit Jubin, Dec 19 2008

Keywords

Crossrefs

Programs

  • PARI
    a=[];for(n=1,10, forprime(p=2,,setsearch(a,p)&&next;for(i=1,2^#a-1,isprime(normlp(vecextract(a,i),1)+p)&&next(2));a=concat(a,p);print1(p","))) \\ Very simplistic, should at least avoid an odd number of odd primes in the partial sum of earlier terms. \\ M. F. Hasler, Jan 29 2015

Extensions

a(8)-a(10) from Donovan Johnson, Dec 23 2008

A153137 Smallest sequence of noncomposite numbers such that no sum of at least two terms is prime.

Original entry on oeis.org

1, 3, 5, 113, 181, 661, 10891, 927149, 88070399, 15288362671
Offset: 1

Views

Author

Benoit Jubin, Dec 19 2008

Keywords

Crossrefs

Programs

  • PARI
    print1(1); a=[1]; for(n=1, 10, forprime(p=vecmin(a)+1, , setsearch(a, p)&&next; for(i=1, 2^#a-1, isprime(normlp(vecextract(a, i), 1)+p)&&next(2)); a=concat(a, p); print1(","p))) \\ Very simplistic, should at least avoid an odd number of terms in the partial sum of earlier terms. \\ M. F. Hasler, Jan 29 2015

Extensions

a(8)-a(10) from Donovan Johnson, Dec 23 2008

A153138 Smallest sequence of odd primes such that no sum of at least two terms is prime.

Original entry on oeis.org

3, 5, 7, 83, 317, 383, 29567, 423509, 118661483, 52542428123
Offset: 1

Views

Author

Benoit Jubin, Dec 19 2008

Keywords

Crossrefs

Programs

  • PARI
    a=[]; for(n=1, 10, forprime(p=if(a,a[#a]+2,3), , setsearch(a, p)&&next; for(i=1, 2^#a-1, isprime(normlp(vecextract(a, i), 1)+p)&&next(2)); a=concat(a, p); print1(p", "))) \\ Very simplistic, should at least avoid an odd number of terms in the partial sum of earlier terms. \\ M. F. Hasler, Jan 29 2015

Extensions

a(8)-a(10) from Donovan Johnson, Dec 23 2008
Showing 1-4 of 4 results.