The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A073925 Powers of 2 rearranged such that every partial sum (n>1) is composite. 2

%I #8 Apr 05 2020 18:51:34

%S 1,8,16,2,64,4,256,1024,32,128,512,2048,8192,4096,16384,32768,131072,

%T 65536,2097152,262144,524288,1048576,4194304,8388608,16777216,

%U 33554432,67108864,134217728,268435456,536870912,2147483648,1073741824

%N Powers of 2 rearranged such that every partial sum (n>1) is composite.

%H Robert Israel, <a href="/A073925/b073925.txt">Table of n, a(n) for n = 1..3319</a>

%e a(2)=8 because 1+2=3, 1+4=5 are primes and 1+8=9 is composite.

%p N:= 100: # for terms before the first > 2^N

%p Cands:= [seq(2^i,i=0..N)]:

%p Res:= NULL: s:= 0: nC:= N+1:

%p found:= true;

%p while found do

%p found:= false;

%p for i from 1 to nC do

%p if not isprime(s+Cands[i]) then

%p Res:= Res, Cands[i];

%p s:= s + Cands[i];

%p Cands:= subsop(i=NULL, Cands);

%p nC:= nC-1;

%p found:= true;

%p break

%p fi

%p od

%p od:

%p Res; # _Robert Israel_, Apr 05 2020

%Y Cf. A073923, A073924.

%K nonn

%O 1,2

%A _Amarnath Murthy_, Aug 19 2002

%E More terms from _Sascha Kurz_, Feb 01 2003

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 May 28 15:56 EDT 2024. Contains 372916 sequences. (Running on oeis4.)