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
M. F. Hasler, Table of n, a(n) for n = 0..9999
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
M. F. Hasler, Jan 29 2015
STATUS
approved