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.

A359145 a(n) = smallest k such that li(k) - pi(k) >= n, where li(k) is the logarithmic integral and pi(x) is the number of primes <= x.

Original entry on oeis.org

6, 10, 27, 57, 95, 148, 221, 345, 539, 806, 1270, 1393, 1407, 1422, 2590, 2645, 3292, 4888, 4930, 5374, 7406, 7442, 8511, 11578, 11653, 11671, 11765, 11774, 18997, 19066, 19135, 19204, 19362, 19372, 30621, 31925, 31935, 31946, 31956, 47038, 47264, 55573, 64993
Offset: 1

Views

Author

N. J. A. Sloane, Feb 06 2023

Keywords

Comments

Suggested by the "Great Prime Number Race", which investigates when li(n) - pi(n) changes sign.
Note this is different from the smallest k such that A052435(k) >= n, because of the rounding in A052435.
Since, by the prime number theorem li(n)/pi(n) converges to 1, this sequence is probably finite.

References

  • Roger Plymen, The Great Prime Number Race, AMS, 2020.

Crossrefs

Programs

  • Mathematica
    seq[len_, kmax_] := Module[{s = Table[0, {len}], c = 0, k = 1, d}, While[c < len && k <= kmax, d = Floor[LogIntegral[k] - PrimePi[k]]; If[d > 0 && d <= len && s[[d]] == 0, Do[If[s[[i]] == 0, s[[i]] = k; c++], {i, 1, d}]]; k++]; s]; seq[50, 10^6] (* Amiram Eldar, Feb 07 2023 *)

Extensions

More terms from Amiram Eldar, Feb 07 2023