OFFSET
1,1
PROG
(PARI) a(n) = my(N=10^n-1, count=0, L=#digits(sqrtint(N))); for(k=1, L-1, count += binomial(primepi(10^k) - primepi(10^(k-1)) + 1, 2)); my(min = 10^(L-1), max = 10^L-1, pi_min = primepi(min), pi_max = primepi(max), j = 0); forprime(p = min, max, if(p*p <= N, count += if(N >= p*max, pi_max, primepi(N\p)) - pi_min - j; j+=1, break)); count; \\ Daniel Suteu, Apr 09 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Jason Earls, Aug 09 2003
EXTENSIONS
More terms from Ray Chandler, Aug 31 2003
a(11)-a(14) from Ray Chandler, Jul 21 2005
a(15)-a(16) from Donovan Johnson, May 30 2010
a(17)-a(18) from Daniel Suteu, Apr 09 2022
STATUS
approved