OFFSET
0,2
LINKS
David Baugh, Table of n, a(n) for n = 0..52
FORMULA
a(2n) = A006880(n). - R. J. Mathar, Jan 13 2007
EXAMPLE
a(3) = 11: sqrt(1000) = 31.62277660..., pi(31) = 11.
MATHEMATICA
a={}; For[n=0, n<=27, n++, AppendTo[a, PrimePi[10^(n/2)]]]; Print[a]; (* John W. Layman, Mar 12 2010 *)
PROG
(PARI) { a= 0; n= 1; p=2 ; while(1, a++ ; pnext =nextprime(p+1) ; if( p^2 <= 10^n && pnext^2>10^n, print(a) ; n++ ; ) ; p=pnext ; ) ; } \\ R. J. Mathar, Jan 13 2007
(Python)
from math import isqrt
from sympy import primepi
def A122121(n): return primepi(isqrt(10**n)) # Chai Wah Wu, Oct 17 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, based on a suggestion from Klaus Kastberg (Kastberg(AT)aapt.net.au), Oct 17 2006
EXTENSIONS
More terms from R. J. Mathar, Jan 13 2007
a(0)-a(17) confirmed, and a(18)-a(26) added using Mathematica, by John W. Layman, Mar 12 2010
a(27) and a(28) added using Mathematica, by David Baugh, Oct 06 2011
a(29) from Donovan Johnson, Mar 12 2013
a(30)-a(46) added using Kim Walisch's primecount program, by David Baugh, Feb 10 2015
a(47)-a(52) from David Baugh using Kim Walisch's primecount program, Jun 19 2016
STATUS
approved