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”).

A120033
Number of semiprimes s such that 2^n < s <= 2^(n+1).
15
0, 1, 1, 4, 4, 12, 20, 40, 75, 147, 285, 535, 1062, 2006, 3918, 7548, 14595, 28293, 54761, 106452, 206421, 401522, 780966, 1520543, 2962226, 5777162, 11272279, 22009839, 43006972, 84077384, 164482781, 321944211, 630487562, 1235382703
OFFSET
0,4
COMMENTS
The partial sum equals the number of Pi_2(2^n) = A125527(n).
LINKS
Dana Jacobsen, Table of n, a(n) for n = 0..62 (first 48 terms from Charles R Greathouse IV, corrected a(47)-a(48))
EXAMPLE
(2^2, 2^3] there is one semiprime, namely 6. 4 was counted in the previous entry.
MATHEMATICA
SemiPrimePi[n_] := Sum[PrimePi[n/Prime[i]] - i + 1, {i, PrimePi[Sqrt[n]]}]; t = Table[SemiPrimePi[2^n], {n, 0, 35}]; Rest@t - Most@t
PROG
(PARI) pi2(n)=my(s, i); forprime(p=2, sqrt(n), s+=primepi(n\p); i++); s - i * (i-1)/2
a(n)=pi2(2^(n+1))-pi2(2^n) \\ Charles R Greathouse IV, May 15 2012
(Perl) use ntheory ":all"; print "$_ ", semiprime_count(1+(1<<$_), 1<<($_+1)), "\n" for 0..48; # Dana Jacobsen, Mar 04 2019
(Perl) use ntheory ":all"; my $l=0; for (0..48) { my $c=semiprime_count(1<<($_+1)); print "$_ ", $c-$l, "\n"; $l=$c; } # Dana Jacobsen, Mar 04 2019
KEYWORD
nonn
AUTHOR
STATUS
approved