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.

Original entry on oeis.org

1, 8, 16, 2, 64, 4, 256, 1024, 32, 128, 512, 2048, 8192, 4096, 16384, 32768, 131072, 65536, 2097152, 262144, 524288, 1048576, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 2147483648, 1073741824
Offset: 1

Views

Author

Amarnath Murthy, Aug 19 2002

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    N:= 100: # for terms before the first > 2^N
    Cands:= [seq(2^i,i=0..N)]:
    Res:= NULL: s:= 0: nC:= N+1:
    found:= true;
    while found do
      found:= false;
      for i from 1 to nC do
        if not isprime(s+Cands[i]) then
          Res:= Res, Cands[i];
          s:= s + Cands[i];
          Cands:= subsop(i=NULL, Cands);
          nC:= nC-1;
          found:= true;
          break
        fi
      od
    od:
    Res; # Robert Israel, Apr 05 2020

Extensions

More terms from Sascha Kurz, Feb 01 2003