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.

A086498 Rearrangement of primes such that every (2n)-th partial sum is a prime. Every (2n+1)-st term is the smallest prime which has not been included earlier.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 31, 19, 23, 29, 37, 41, 43, 47, 61, 53, 67, 59, 73, 71, 97, 79, 83, 89, 103, 101, 109, 107, 127, 113, 151, 131, 139, 137, 163, 149, 199, 157, 173, 167, 181, 179, 271, 191, 229, 193, 257, 197, 277, 211, 239, 223, 263, 227, 313, 233, 241, 251
Offset: 1

Views

Author

Amarnath Murthy, Jul 28 2003

Keywords

Crossrefs

Programs

  • Maple
    N:= 100: # to get all terms before the first term > Prime(N).
    Primes:= [seq(ithprime(i),i=2..N)]: nP:= N-1: S:= 2: R:= 2:
    do
      found:= false;
      for j from 1 to nP do
        if isprime(S+Primes[j]) then
          R:= R, Primes[j];
          S:= S + Primes[j];
          Primes:= subsop(j=NULL, Primes);
          nP:= nP-1;
          found:= true;
          break
        fi
      od;
      if not found or nP = 0 then break fi;
      R:= R, Primes[1];
      S:= S + Primes[1];
      Primes:= Primes[2..-1];
      nP:= nP-1;
    od:
    R; # Robert Israel, Aug 04 2020

Extensions

More terms from Ray Chandler, Sep 17 2003