OFFSET
0,5
COMMENTS
I.e., number of numbers <= 2^n that are the product of two distinct primes.
EXAMPLE
a(5) = 7 because there are 7 squarefree semiprimes <= 2^5 = 32:
2*3 = 6, 2*5 = 10, 2*7 = 14, 2*11 = 22, 2*13 = 26,
3*5 = 15, 3*7 = 21.
a(6) = 18 because there are 18 squarefree semiprimes <= 2^6 = 64:
2*{3,5,7,11,13,17,19,23,29,31} = {6,10,14,22,26,34,38,46,58,62},
3*{5,7,11,13,17,19} = {15,21,33,39,51,57},
5*{7,11} = {35,55}.
MATHEMATICA
Reap[Do[Do[If[And[PrimeOmega[#] == 2, SquareFreeQ[#]], c++] &[k], {k, 2^(n - 1) + 1, 2^n}]; Sow[c], {n, 0, 16}]][[-1, -1]] (* Michael De Vlieger, Oct 30 2022 *)
Module[{nn=22, sfsp}, sfsps=Table[If[PrimeOmega[n]==2&&SquareFreeQ[n], 1, 0], {n, 2^nn}]; Table[ Total[ Take[sfsps, 2^x]], {x, 0, nn}]] (* Harvey P. Dale, Apr 02 2023 *)
PROG
(PARI) a(n) = sum(k=1, 2^n, bigomega(k)==2&&issquarefree(k)); \\ Michel Marcus, Oct 30 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon E. Schoenfield, Oct 29 2022
STATUS
approved