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.

A045881 Smallest of first string of exactly 2n-1 consecutive composite integers.

Original entry on oeis.org

4, 8, 24, 90, 140, 200, 114, 1832, 524, 888, 1130, 1670, 2478, 2972, 4298, 5592, 1328, 9552, 30594, 19334, 16142, 15684, 81464, 28230, 31908, 19610, 35618, 82074, 44294, 43332, 34062, 89690, 162144, 134514, 173360, 31398, 404598, 212702, 188030, 542604
Offset: 1

Views

Author

Keywords

Crossrefs

Equals A000230(n) + 1.

Programs

  • Mathematica
    Reap[For[k=2, k <= 80, k = k+2, p=3; q=5; While[q-p != k, p=q; q=NextPrime[p+1]]; Print[p+1]; Sow[p+1]]][[2, 1]] (* Jean-François Alcover, May 17 2013, after Klaus Brockhaus *)
    With[{cmps=Table[If[CompositeQ[n],1,0],{n,10^6}]},Flatten[Table[ SequencePosition[ cmps,Join[{0},PadRight[{},i,1],{0}],1],{i,1,81,2}],1][[All,1]]+1] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 02 2017 *)
  • PARI
    forstep(k=2,80,2,p=3;q=5;while(q-p!=k,p=q;q=nextprime(p+1));print1(p+1,",")) \\ Klaus Brockhaus, Jan 24 2008

Extensions

More terms from Harvey P. Dale, Jul 27 2001