login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A358078
a(n) is the number of squarefree semiprimes <= 2^n.
0
0, 0, 0, 1, 4, 7, 18, 37, 76, 149, 293, 575, 1106, 2162, 4161, 8068, 15604, 30181, 58449, 113179, 219587, 425951, 827393, 1608250, 3128647, 6090677, 11867571, 23139485, 45148817, 88155104, 172231561, 336713062, 658655523, 1289140675, 2524520079, 4946303842
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