login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A254341 Lexicographically earliest sequence of distinct numbers with alternating parity such that no sum of consecutive terms is prime. 5

%I #20 Jan 29 2015 21:32:24

%S 0,1,8,25,24,27,6,9,30,15,42,39,18,21,36,33,60,35,16,69,48,63,12,51,

%T 66,45,72,87,54,93,78,81,90,57,84,75,114,111,96,99,120,105,102,117,

%U 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

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

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

%C Without the condition that the parity alternates, it seems that the sequence (A254337) contains only a single odd number.

%C It appears that a(n) ~ 3n. Is there a simple explanation for this?

%H M. F. Hasler, <a href="/A254341/b254341.txt">Table of n, a(n) for n = 0..9999</a>

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

%Y Cf. A254337, A153136.

%K nonn

%O 0,3

%A _M. F. Hasler_, Jan 29 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 13 11:43 EDT 2024. Contains 374282 sequences. (Running on oeis4.)