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.

A349999 Least number m of primes that must have appeared in an interval [j^2, (j+1)^2], such that all intervals [k^2, (k+1)^2], k>j contain more than m primes. The corresponding values of j are A349998.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 18, 19, 22, 24, 26, 27, 28, 29, 30, 32, 33, 35, 36, 38, 39, 40, 41, 44, 45, 47, 51, 54, 56, 63, 65, 68, 70, 71, 78, 80, 85, 94, 99, 106, 107, 114, 115, 120, 121, 127, 133, 138, 146, 154, 155, 164, 168, 169, 175, 176, 177
Offset: 1

Views

Author

Hugo Pfoertner, Dec 09 2021

Keywords

Comments

All terms are empirical (see the graph of A014085 for the limited width of the scatter band), but supporting the validity of Legendre's conjecture that there is always a prime between n^2 and (n+1)^2.
The terms are determined by searching from large to small indices in A014085 for new minima.

Examples

			See A349997 and A349998.
		

Crossrefs

Formula

a(n) = A014085(A349998(n)).
A014085(k) > a(n) for k > A349998(n).
A014085(k) >= a(n) for k >= A349997(n).

A076957 Smallest k such that there are exactly n primes strictly between k^2 and (k+1)^2.

Original entry on oeis.org

1, 4, 6, 10, 15, 16, 25, 24, 31, 39, 38, 45, 64, 48, 52, 57, 75, 82, 81, 70, 76, 79, 106, 112, 145, 111, 121, 117, 123, 134, 144, 139, 146, 154, 163, 192, 169, 176, 179, 193, 202, 218, 204, 226, 223, 240, 233, 238, 243, 259, 291, 256, 286, 309, 278
Offset: 2

Views

Author

Amarnath Murthy, Oct 20 2002

Keywords

Comments

From David W. Wilson, Jan 08 2017: (Start)
a(n)^2 = A076956(n).
A014085(a(n)) = n.
Conjecturally, a(n) is undefined for n = 1 and defined for all n >= 2. (End)

Crossrefs

Programs

  • Maple
    a := proc(n) local k, h, SEARCHLIMIT; SEARCHLIMIT := 10000; h := proc(k) option remember; nops(select(j->isprime(j), [$k^2+1..(k+1)^2])) end: k := 1; while h(k) <> n and k < SEARCHLIMIT do k := k+1 od; `if`(k=SEARCHLIMIT, print("Search limit reached!"), k) end: seq(a(n), n=2..56); # Peter Luschny, Jan 10 2017
  • Mathematica
    Table[k = 1; While[Count[Map[PrimeQ, Range[k^2 + 1, (k + 1)^2]], True] != n, k++]; k, {n, 2, 56}] (* Michael De Vlieger, Jan 10 2017 *)
    With[{pp=Table[Count[Range[n^2+1,(n+1)^2-1],?(PrimeQ[#]&)],{n,500}]},Table[ Position[pp,k,1,1],{k,60}]]//Flatten (* _Harvey P. Dale, Aug 01 2021 *)

Extensions

More terms from Ralf Stephan, Oct 31 2002

A333846 Numbers k such that the number of primes between k^2 and (k+1)^2 increases to a new record.

Original entry on oeis.org

0, 1, 4, 6, 10, 15, 16, 24, 31, 38, 45, 48, 52, 57, 70, 76, 79, 106, 111, 117, 123, 134, 139, 146, 154, 163, 169, 176, 179, 193, 202, 204, 223, 233, 238, 243, 256, 278, 284, 318, 326, 336, 359, 369, 412, 419, 430, 456, 458, 468, 479, 517, 550, 564, 595, 601, 612
Offset: 1

Views

Author

Bernard Schott, Apr 08 2020

Keywords

Comments

Legendre's conjecture (still open) states that for n > 0 there is always a prime between n^2 and (n+1)^2. The number of primes between n^2 and (n+1)^2 is equal to A014085(n), so, the corresponding records are given by A014085(a(n)) = 0, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, ... (A349996).
m = 25 is the smallest number such that there are exactly 8 primes between m^2 = 625 et (m+1)^2 = 676, namely {631, 641, 643, 647, 653, 659, 661, 673} but there are 9 primes between 24^2 = 576 et 25^2 = 625, namely {577, 587, 593, 599, 601, 607, 613, 617, 619} so 24 is a term but not 25; hence, 25 is the first term of A076957 that is not a record.
This sequence is infinite. Suppose for contradiction that a(n) = k was the last term, with s primes between k^2 and (k+1)^2. Then there are at most s primes between (k+1)^2 and (k+2)^2, at most s primes between (k+2)^2 and (k+3)^3, and at most s*sqrt(x) + pi(k^2) primes up to x. But there are ~ x/log x primes up to x by the Prime Number Theorem, a contradiction. This can be made sharp with various explicit estimates. - Charles R Greathouse IV, Apr 10 2020

Examples

			There are 7 primes between 16^2 and 17^2, i.e., 256 and 289, which are 257, 263, 269, 271, 277, 281, 283, and there does not exist k < 16 with 7 or more primes between k^2 and (k+1)^2, hence, 16 is in the sequence.
		

Crossrefs

Cf. A333241 (Similar records between k and (9/8)*k).

Programs

  • Mathematica
    primeCount[n_] := PrimePi[(n + 1)^2] - PrimePi[n^2]; pmax = -1; seq = {}; Do[p = primeCount[n]; If[p > pmax, pmax = p; AppendTo[seq, n]], {n, 0, 612}]; seq (* Amiram Eldar, Apr 08 2020 *)
  • PARI
    print1(pr=0,", ");pp=0;for(k=1,650,my(pc=primepi(k*k));if(pc-pp>pr,print1(k-1,", ");pr=pc-pp);pp=pc) \\ Hugo Pfoertner, Apr 10 2020

Extensions

More terms from Michel Marcus, Apr 08 2020

A084596 a(n) is the number of times n is in sequence A014085; i.e., there are exactly a(n) cases where there are exactly n primes between m^2 and (m+1)^2 for m >= 0.

Original entry on oeis.org

1, 0, 4, 3, 4, 4, 4, 5, 4, 7, 5, 5, 5, 7, 2, 7, 5, 6, 4, 4, 5, 10, 6, 9, 7, 5, 2, 5, 6, 6, 10, 4, 5, 11, 5, 3, 8, 3, 8, 9, 7, 10, 5, 4, 6, 8, 8, 5, 6, 10, 8, 9, 4, 4, 6, 7, 8, 7, 5, 10, 9, 9, 6, 8, 7, 7, 7, 8, 6, 3, 5, 8, 4, 8, 14, 8, 7, 9, 10, 6, 9, 6, 7, 6, 6, 8, 10, 4, 8, 7, 6, 8, 5, 14, 6, 7, 11, 7, 10, 8
Offset: 0

Views

Author

Harry J. Smith, May 31 2003

Keywords

Comments

This sequences uses a finite number of terms of A014085 to conjecture the behavior of all terms of A014085. The first 10000 terms of this sequence were computed using 120000 terms of A014085. Legendre's conjecture is equivalent to a(0) remaining 1 for all terms of A014085. [Comment reworded by T. D. Noe, Sep 04 2008]

Examples

			a(14)=2 because 14 is in sequence A014085 only two times. There are 14 primes between 64^2 and 65^2 as well as between 77^2 and 78^2. These are the only cases with exactly 14 primes.
		

References

  • P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, 1991, p. 143.

Crossrefs

Showing 1-4 of 4 results.