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.

Showing 1-6 of 6 results.

A000101 Record gaps between primes (upper end) (compare A002386, which gives lower ends of these gaps).

Original entry on oeis.org

3, 5, 11, 29, 97, 127, 541, 907, 1151, 1361, 9587, 15727, 19661, 31469, 156007, 360749, 370373, 492227, 1349651, 1357333, 2010881, 4652507, 17051887, 20831533, 47326913, 122164969, 189695893, 191913031, 387096383, 436273291, 1294268779
Offset: 1

Views

Author

Keywords

Comments

See A002386 for complete list of known terms and further references.
Except for a(1)=3 and a(2)=5, a(n) = A168421(k). Primes 3 and 5 are special in that they are the only primes which do not have a Ramanujan prime between them and their double, <= 6 and 10 respectively. Because of the large size of a gap, there are many repeats of the prime number in A168421. - John W. Nicholson, Dec 10 2013

References

  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 133.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000040, A001223 (differences between primes), A002386 (lower ends), A005250 (record gaps), A107578.
Cf. also A005669, A111943.

Programs

  • Mathematica
    s = {3}; gm = 1; Do[p = Prime[n + 1]; g = p - Prime[n]; If[g > gm, Print[p]; AppendTo[s, p]; gm = g], {n, 2, 1000000}]; s  (* Jean-François Alcover, Mar 31 2011 *)
  • PARI
    p=q=2;g=0;until( g<(q=nextprime(1+p=q))-p & print1(p+g=q-p,","),) \\ M. F. Hasler, Dec 13 2007

Formula

a(n) = A002386(n) + A005250(n) = A008995(n-1) + 1. - M. F. Hasler, Dec 13 2007

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

A008950 Increasing length runs of consecutive composite numbers (starting points).

Original entry on oeis.org

4, 8, 24, 90, 114, 524, 888, 1130, 1328, 9552, 15684, 19610, 31398, 155922, 360654, 370262, 492114, 1349534, 1357202, 2010734, 4652354, 17051708, 20831324, 47326694, 122164748, 189695660, 191912784, 387096134, 436273010, 1294268492
Offset: 1

Views

Author

Mark Cramer (m.cramer(AT)qut.edu.au). Computed by Dennis Yelle (dennis(AT)netcom.com)

Keywords

Comments

There are runs of n consecutive composite numbers for every n. For example, the n numbers (n+1)!+2 ... (n+1)!+n+1 are composite. Such a run may start of course earlier than this. - Joerg Arndt, May 01 2013

Crossrefs

Programs

  • Mathematica
    maxGap = 1; Reap[Do[p = Prime[n]; gap = Prime[n+1] - p; If[gap > maxGap, Print[p+1]; Sow[p+1]; maxGap = gap], {n, 2, 10^8 }]][[2, 1]] (* Jean-François Alcover, Jun 15 2012 *)

Formula

a(n) = A002386(n+1)+1.
a(n) <= (n+1)! + 2. [Joerg Arndt, May 01 2013]

A030296 Smallest start for a run of at least n composite numbers.

Original entry on oeis.org

4, 8, 8, 24, 24, 90, 90, 114, 114, 114, 114, 114, 114, 524, 524, 524, 524, 888, 888, 1130, 1130, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 9552, 9552, 15684, 15684, 15684, 15684, 15684, 15684, 15684, 15684, 19610, 19610, 19610
Offset: 1

Views

Author

Keywords

Comments

a(n) is even, since a(n)-1 is a prime > 2, by the minimality of a(n). - Jonathan Sondow, May 31 2014
Except for a(1), records occur at even values of n, and each term appears an even number of times consecutively. (Proof. A maximal run of composites must begin and end at even numbers.) - Jonathan Sondow, May 31 2014

Examples

			a(5) = 24 as 24 is the first of the five consecutive composite numbers 24, 25, 26, 27, 28.
		

References

  • Amarnath Murthy, Some more conjectures on primes and divisors, Smarandache Notions Journal, Vol. 12, No. 1-2-3, Spring 2001.

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = For[p1 = a[n-1]-1; p2 = NextPrime[p1], True, p1 = p2; p2 = NextPrime[p1], If[ p2-p1-1 >= n, Return[p1+1]]]; a[1] = 4; Table[a[n], {n, 1, 43}] (* Jean-François Alcover, May 24 2012 *)
    Module[{nn=20000,cmps},cmps=Table[If[CompositeQ[n],1,0],{n,nn}];Table[ SequencePosition[ cmps,PadRight[{},k,1],1][[1,1]],{k,50}]] (* Harvey P. Dale, Jan 01 2022 *)

Formula

a(n) = A104138(n) + 1. - Jonathan Sondow, May 31 2014

A192226 Numbers n such that all integers in the interval (n-2*sqrt(sqrt(n)), n] are composite.

Original entry on oeis.org

1, 28, 36, 96, 120, 121, 122, 123, 124, 125, 126, 146, 147, 148, 189, 190, 207, 208, 209, 210, 219, 220, 221, 222, 249, 250, 292, 302, 303, 304, 305, 306, 326, 327, 328, 329, 330, 346, 477, 478, 519, 520, 533, 534, 535, 536, 537, 538, 539, 540, 630, 672
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 26 2011

Keywords

Comments

a(14432) = 191913030 is probably the last term. Any further terms must be greater than 1.5 * 10^18. - Charles R Greathouse IV, Jun 30 2011

Crossrefs

Programs

  • Mathematica
    Select[Range[700],NextPrime[#-2Sqrt[Sqrt[#]]]>#&] (* Harvey P. Dale, Jul 27 2011 *)
  • PARI
    is(n)=for(k=0,sqrtnint(16*n-1,4),if(isprime(n-k), return(0))); 1 \\ Charles R Greathouse IV, Aug 26 2015

Extensions

a(12)-a(13) added, a(53)-a(56) corrected by Charles R Greathouse IV, Jun 30 2011

A056784 First nonprime in a sequence of consecutive nonprimes which is at least twice as long as any earlier run of consecutive nonprimes in this list.

Original entry on oeis.org

1, 8, 90, 524, 9552, 31398, 2010734, 2300942550, 2614941710600, 352521223451364324
Offset: 1

Views

Author

Keywords

Examples

			2300942550 is the first of 319 consecutive composite numbers.
2614941710600 is the first of 651 consecutive composite numbers.
352521223451364324 is the first of 1327 consecutive composite numbers.
		

Crossrefs

Extensions

Corrected by R. J. Mathar, Sep 29 2006
Three more terms from Donovan Johnson, Jan 28 2008
Showing 1-6 of 6 results.