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.

A038625 a(n) is smallest number m such that m = n*pi(m), where pi(k) = number of primes <= k (A000720).

Original entry on oeis.org

2, 27, 96, 330, 1008, 3059, 8408, 23526, 64540, 175197, 480852, 1304498, 3523884, 9557955, 25874752, 70115412, 189961182, 514272411, 1394193580, 3779849598, 10246935644, 27788566029, 75370121160, 204475052375, 554805820452, 1505578023621, 4086199301996, 11091501630949
Offset: 2

Views

Author

Keywords

Comments

Golomb shows that solutions exist for each n>1.
Equivalently, for n > 1, least m such that m >= n*pi(m). - Eric M. Schmidt, Aug 05 2014
The values a(26),...,a(50) were calculated with the Eratosthenes sieve making use of strong bounds for pi(x), which follow from partial knowledge of the Riemann hypothesis, and the analytic method for calculating initial values of pi(x). - Jan Büthe, Jan 16 2015

Examples

			pi(3059) = 437 and 3059/437 = 7, so a(7)=3059.
		

Crossrefs

Programs

  • Maple
    with(numtheory); f:=proc(n) local i; for i from 2 to 10000 do if i mod pi(i) = 0 and i/pi(i) = n then RETURN(i); fi; od: RETURN(-1); end; # N. J. A. Sloane, Sep 01 2008
  • Mathematica
    t = {}; k = 2; Do[While[n*PrimePi[k] != k, k++]; AppendTo[t, k], {n, 2, 15}]; t (* Jayanta Basu, Jul 10 2013 *)
  • PARI
    a(n)=my(k=1); while(k!=n*primepi(k),k++); k;
    for (n=2, 20, print1(a(n), ", ")); \\ Derek Orr, Aug 13 2014
    
  • Python
    from math import exp
    from sympy import primepi
    def a(n):
      m = 2 if n == 2 else int(exp(n)) # pi(m) > m/log(m) for m >= 17
      while m != n*primepi(m): m += 1
      return m
    print([a(n) for n in range(2, 10)]) # Michael S. Branicky, Feb 27 2021

Formula

It appears that a(n) is asymptotic to e^2*exp(n). - Chris K. Caldwell, Apr 02 2008
a(n) = A038626(n) * n. - Max Alekseyev, Oct 13 2023

Extensions

Three more terms from Labos Elemer, Sep 12 2003
Edited by N. J. A. Sloane at the suggestion of Chris K. Caldwell, Apr 08 2008
24 terms added and entry a(26) corrected by Jan Büthe, Jan 07 2015