

A254341


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


5



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


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?


LINKS



PROG

(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])}


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



