login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A036352
Number of numbers up to 10^n that are products of two primes.
16
4, 34, 299, 2625, 23378, 210035, 1904324, 17427258, 160788536, 1493776443, 13959990342, 131126017178, 1237088048653, 11715902308080, 111329817298881, 1061057292827269, 10139482913717352, 97123037685177087, 932300026230174178, 8966605849641219022, 86389956293761485464, 833671466551239927908, 8056846659984852885191
OFFSET
1,1
LINKS
Dragos Krisan and Radek Erban, On the counting function of semiprimes, arXiv:2006.16491 [math.NT], 8 Jul 2020.
MATHEMATICA
SemiPrimePi[n_] := Sum[ PrimePi[n/Prime@ i] - i + 1, {i, PrimePi@ Sqrt@ n}]; Array[ SemiPrimePi[10^#] &, 14] (* Robert G. Wilson v, Feb 12 2015 *)
PROG
(PARI) a(n)=my(s); forprime(p=2, sqrt(10^n), s+=primepi(10^n\p)); s-binomial(primepi(sqrt(10^n)), 2) \\ Charles R Greathouse IV, Apr 23 2012
(Python)
from math import isqrt
from sympy import primepi, primerange
def A036352(n): return int((-(t:=primepi(s:=isqrt(m:=10**n)))*(t-1)>>1)+sum(primepi(m//k) for k in primerange(1, s+1))) # Chai Wah Wu, Aug 16 2024
CROSSREFS
Essentially the same as A066265.
Sequence in context: A155628 A346936 A356286 * A005569 A370171 A232910
KEYWORD
nonn,changed
EXTENSIONS
a(14) from Robert G. Wilson v, May 16 2005
a(15)-a(16) from Donovan Johnson, Mar 18 2010
a(17)-a(18) from A066265, added by Jens Kruse Andersen, Aug 16 2014
a(19)-a(21) from Henri Lifchitz, Jul 04 2015
a(22)-a(23) from Henri Lifchitz, Nov 09 2024
STATUS
approved