|
|
A036351
|
|
Number of numbers <= 10^n that are products of two distinct primes.
|
|
5
|
|
|
2, 30, 288, 2600, 23313, 209867, 1903878, 17426029, 160785135, 1493766851, 13959963049, 131125938680, 1237087821006, 11715901643501, 111329815346924, 1061057287065814, 10139482896634686, 97123037634329553, 932300026078297246, 8966605849186166511, 86389956292394285653
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (1/2)*(pi(10^(n/2)) + Sum_{i=1..pi(10^n)} pi((10^n-1)/P_i)) -1 = Sum_{i=1..pi(sqrt(10^n))} (pi((10^n-1)/P_i) -1) - binomial(pi(sqrt(10^n)), 2). - Robert G. Wilson v, May 19 2005
|
|
MATHEMATICA
|
f[n_] := Sum[ PrimePi[n/Prime[i]] - i, {i, PrimePi[ Sqrt[ n]] }]; Table[ f[10^n], {n, 14}] (* Robert G. Wilson v, Feb 07 2012 and modified Dec 28 2016 *)
|
|
PROG
|
(PARI) a(n)=my(s); forprime(p=2, sqrt(10^n), s+=primepi(10^n\p)); s-binomial(primepi(sqrt(10^n))+1, 2) \\ Charles R Greathouse IV, Apr 23 2012
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|