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.

A008996 Increasing length runs of consecutive composite numbers (records).

Original entry on oeis.org

1, 3, 5, 7, 13, 17, 19, 21, 33, 35, 43, 51, 71, 85, 95, 111, 113, 117, 131, 147, 153, 179, 209, 219, 221, 233, 247, 249, 281, 287, 291, 319, 335, 353, 381, 383, 393, 455, 463, 467, 473, 485, 489, 499, 513, 515, 531, 533, 539, 581, 587, 601, 651, 673, 715, 765
Offset: 1

Views

Author

Mark Cramer (m.cramer(AT)qut.edu.au), Mar 15 1996

Keywords

Comments

Conjecture: a(n) = O(n^2); specifically, a(n) <= n^2. - Alexei Kourbatov, Jan 23 2019

Crossrefs

Programs

  • Haskell
    a008996 n = a008996_list !! (n-1)
    a008996_list = 1 : f 0 (filter (> 1) $
                            map length $ group $ drop 3 a010051_list)
       where f m (u : us) = if u <= m then f m us else u : f u us
    -- Reinhard Zumkeller, Nov 27 2012
  • Mathematica
    maxGap = 1; Reap[ Do[ gap = Prime[n+1] - Prime[n]; If[gap > maxGap, Print[gap-1]; Sow[gap-1]; maxGap = gap], {n, 2, 10^8}]][[2, 1]] (* Jean-François Alcover, Jun 12 2013 *)
    Module[{nn=10^8,cmps},cmps=Table[If[CompositeQ[n],1,{}],{n,nn}];DeleteDuplicates[ Rest[ Length/@ Split[cmps]],GreaterEqual]] (* The program generates the first 24 terms of the sequnece. To generate more, increase the nn constant. *) (* Harvey P. Dale, Sep 04 2022 *)

Formula

a(n) = A005250(n+1) - 1.

Extensions

More terms from Warren D. Smith, Dec 11 2000
a(40) corrected by Bert Sierra, Jul 12 2025