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.

A254341 Lexicographically earliest sequence of distinct numbers with alternating parity such that no sum of consecutive terms is prime.

Original entry on oeis.org

0, 1, 8, 25, 24, 27, 6, 9, 30, 15, 42, 39, 18, 21, 36, 33, 60, 35, 16, 69, 48, 63, 12, 51, 66, 45, 72, 87, 54, 93, 78, 81, 90, 57, 84, 75, 114, 111, 96, 99, 120, 105, 102, 117, 144, 123, 108, 129, 126, 135, 138, 147, 150, 141, 162, 153, 156, 159, 132, 171, 174, 165, 168, 177, 192, 183, 180, 189, 186, 195, 198, 207, 204, 201, 216, 213, 228, 219, 210, 231, 222, 249, 240, 237, 252, 243, 258, 255, 234, 261, 246, 225, 288, 267, 264, 273, 276, 279, 270
Offset: 0

Views

Author

M. F. Hasler, Jan 29 2015

Keywords

Comments

In other words, no sum a(i)+a(i+1)+a(i+2)+...+a(j) may be prime. In particular, the sequence may not contain any primes.
Without the condition that the parity alternates, it seems that the sequence (A254337) contains only a single odd number.
It appears that a(n) ~ 3n. Is there a simple explanation for this?

Crossrefs

Programs

  • PARI
    {N=10^3; a=[]; u=0; for(i=0,N, a=concat(a,i%2); until( ! isprime(s) || ! a[#a]+=2, while( isprime(a[#a]) || bittest(u,a[#a]), a[#a]+=2);  s=a[k=#a]; while( k>1 && ! isprime( s+=a[k--]),)); u+=2^a[#a])}