A038625 a(n) is smallest number m such that m = n*pi(m), where pi(k) = number of primes <= k (A000720).
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
Keywords
Examples
pi(3059) = 437 and 3059/437 = 7, so a(7)=3059.
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.
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
Comments