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-4 of 4 results.

A104138 Smallest prime followed by n or more composites.

Original entry on oeis.org

2, 3, 7, 7, 23, 23, 89, 89, 113, 113, 113, 113, 113, 113, 523, 523, 523, 523, 887, 887, 1129, 1129, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 9551, 9551, 15683, 15683, 15683, 15683, 15683, 15683, 15683, 15683, 19609
Offset: 0

Views

Author

Lekraj Beedassy, Mar 07 2005

Keywords

Comments

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(10)=113 because it is the first prime occurring before primes 199,211,293,317,467,509,... all followed by at least ten successive composites.
		

Crossrefs

Formula

Record prime A002386(n+1) appears A053695(n-1) times, for n>1.
a(n) = A030296(n) - 1, for n > 0. - Jonathan Sondow, May 31 2014

Extensions

a(34) corrected by Charles R Greathouse IV, Aug 09 2011

A058188 Number of primes between prime(n) and prime(n) + sqrt(prime(n)), where prime(n) is the n-th prime.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 3, 3, 2, 1, 0, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 1, 1, 3, 4, 3, 2, 2, 1, 2, 3, 3, 4, 3, 3, 2, 1, 1, 3, 2, 1, 1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 2, 4, 3, 4, 3, 3, 4, 4, 3, 3, 2, 2, 3, 4, 3, 3, 3, 2, 2, 1, 3
Offset: 1

Views

Author

Adam Kertesz, Dec 04 2000

Keywords

Comments

Conjecture: if prime(n)>=127, there is always at least one prime between prime(n) and prime(n) + sqrt(prime(n)). Easily checked for prime(n)<1.1e15 in existing maximal gap tables

Examples

			a(12) = 2 because between p(12)= 37 and 37+sqrt(37) = 43.08 there are two primes: 41 and 43
		

References

  • R. K. Guy: Unsolved problems in number theory, 2nd ed., Springer-Verlag,1994; Sections A8, A 9.
  • Paulo Ribenboim: The little book of big primes, Springer-Verlag,1991; 142ff

Crossrefs

Cf. A030296.

Programs

  • Mathematica
    Table[PrimePi[p+Sqrt[p]]-PrimePi[p],{p,Prime[Range[100]]}] (* Harvey P. Dale, Mar 13 2023 *)
  • PARI
    a(n) = my(p=prime(n)); primepi(p+sqrtint(p)) - n; \\ Michel Marcus, Jun 21 2017

A060064 First subsequent, disjoint occurrence of n consecutive nonprimes.

Original entry on oeis.org

4, 8, 14, 24, 32, 90, 114, 140, 182, 200, 212, 294, 318, 524, 888, 1070, 1130, 1328, 1638, 1670, 1952, 2180, 2478, 2972, 3138, 3272, 4298, 4832, 5352, 5592, 8468, 9552, 9974, 12854, 14108, 15684, 16142, 19334, 19610, 25472, 28230, 31398, 31908, 34062
Offset: 1

Views

Author

Jason Earls, Mar 25 2001

Keywords

Comments

Conjecture: a(n) - 1 is always prime. - Robert Israel, May 04 2025

Examples

			First occurrence of 1 consecutive nonprime gives 4, first occurrence of 2 consecutive nonprimes gives 8 and 9, the first subsequent and disjoint occurrence of 3 consecutive nonprimes gives 14, 15 and 16, etc.
		

Crossrefs

Programs

  • Maple
    P:= select(isprime, [seq(i,i=3..10^8,2)]):
    G:= P[2..-1]-P[1..-2]:
    R:= NULL: g:= 1:
    for i from 1 to nops(G) do
     gi:= G[i]; ri:= P[i]+1;
     while gi > g do
       R:= R, ri;
       ri:= ri + g;
       gi:= gi - g;
       g:= g+1;
     od;
    od:
    R; # Robert Israel, May 04 2025

Extensions

Better description and more terms from Larry Reeves (larryr(AT)acm.org), Apr 02 2001
Further terms from Michel ten Voorde Apr 10 2001
Missing a(16)=1070 inserted by Sean A. Irvine, Oct 21 2022

A358720 The lowest positive-integer center for a square spiral whose center lies in an n X n square of nonprimes.

Original entry on oeis.org

1, 8, 21, 133, 278, 507, 4442, 5383, 22457, 35628, 177291, 194162, 642257, 1062108, 3351690
Offset: 1

Views

Author

Samuel Harkness, Nov 28 2022

Keywords

Comments

a(n) <= A030296(n^2). A run of n^2 composite numbers guarantees a square spiral centered at the start of the run will lie in an n X n square of nonprimes.

Examples

			For n=4, test square spirals centered at each positive integer until one is found which lies in a 4 X 4 square of nonprimes. Square spirals centered at 1..132 do not work, then for 133 the following square spiral is produced:
.
   197  196  195  194  193  192  191  190  189
.
   198  169  168  167  166  165  164  163  188
.                     +------------------+
   199  170  149  148 |147  146  145  162| 187
.                     |                  |
   200  171  150  137 |136  135  144  161| 186
.                     |                  |
   201  172  151  138 |133  134  143  160| 185
.                     |                  |
   202  173  152  139 |140  141  142  159| 184
.                     +------------------+
   203  174  153  154  155  156  157  158  183
.
   204  175  176  177  178  179  180  181  182
.
   205  206  207  208  209  210  211  212  213
.
Note that 147, 146, 145, 162, 136, 135, 144, 161, 133, 134, 143, 160, 140, 141, 142, and 159 are all nonprime, so the square spiral centered at 133 works.
		

Crossrefs

Showing 1-4 of 4 results.