OFFSET
0,2
LINKS
Eric Weisstein's World of Mathematics, Prime Constant.
Eric Weisstein's World of Mathematics, Semiprime.
Eric Weisstein et al., Characteristic Function.
FORMULA
The characteristic function of the semiprimes is the function f(n) = 1 iff n is semiprime, 0 otherwise. This begins, for n = 0, 1, 2, 3, ... f(n) = 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1... If we concatenate these bits and interpret them as the binary fraction 0.0000101001100011000001... (base 2) we have, expressed as a decimal fraction, 0.0405735002013980686743112664235357506936275821940023586083340694633362...
The characteristic function of A001358 is A064911 (for n >= 1, starting with 0, 0, 0, 1 ...). The binary constant here has an additional 0 after the binary point. - Georg Fischer, Aug 04 2021
MATHEMATICA
Semiprime[n_] := If[Plus @@ Last[ Transpose[ FactorInteger[n]]] == 2, 1, 0]; RealDigits[ FromDigits[{Table[ Semiprime[n], {n, 2, 350}], -2}, 2], 10, 111][[1]] (* Ed Pegg Jr *)
CROSSREFS
KEYWORD
cons,nonn
AUTHOR
Jonathan Vos Post, Jan 17 2005
EXTENSIONS
More terms from Robert G. Wilson v, Jan 24 2005
STATUS
approved