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.

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

This page as a plain text file.
%I A073925 #8 Apr 05 2020 18:51:34
%S A073925 1,8,16,2,64,4,256,1024,32,128,512,2048,8192,4096,16384,32768,131072,
%T A073925 65536,2097152,262144,524288,1048576,4194304,8388608,16777216,
%U A073925 33554432,67108864,134217728,268435456,536870912,2147483648,1073741824
%N A073925 Powers of 2 rearranged such that every partial sum (n>1) is composite.
%H A073925 Robert Israel, <a href="/A073925/b073925.txt">Table of n, a(n) for n = 1..3319</a>
%e A073925 a(2)=8 because 1+2=3, 1+4=5 are primes and 1+8=9 is composite.
%p A073925 N:= 100: # for terms before the first > 2^N
%p A073925 Cands:= [seq(2^i,i=0..N)]:
%p A073925 Res:= NULL: s:= 0: nC:= N+1:
%p A073925 found:= true;
%p A073925 while found do
%p A073925   found:= false;
%p A073925   for i from 1 to nC do
%p A073925     if not isprime(s+Cands[i]) then
%p A073925       Res:= Res, Cands[i];
%p A073925       s:= s + Cands[i];
%p A073925       Cands:= subsop(i=NULL, Cands);
%p A073925       nC:= nC-1;
%p A073925       found:= true;
%p A073925       break
%p A073925     fi
%p A073925   od
%p A073925 od:
%p A073925 Res; # _Robert Israel_, Apr 05 2020
%Y A073925 Cf. A073923, A073924.
%K A073925 nonn
%O A073925 1,2
%A A073925 _Amarnath Murthy_, Aug 19 2002
%E A073925 More terms from _Sascha Kurz_, Feb 01 2003