OFFSET
2,1
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
LINKS
Jan Büthe, Table of n, a(n) for n = 2..50
John D. Cook, Integer odds and prime numbers
S. W. Golomb, On the Ratio of N to pi(N), American Mathematical Monthly, 69 (1962), 36-37.
Eric Weisstein's World of Mathematics, Prime Counting Function.
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
EXAMPLE
pi(3059) = 437 and 3059/437 = 7, so a(7)=3059.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
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
STATUS
approved