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
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Vos Post and Robert G. Wilson v, Mar 20 2006
STATUS
approved