A064911 If n is semiprime (or 2-almost prime) then 1 else 0.
0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65545 (first 10000 terms from Reinhard Zumkeller)
- Eric Weisstein's World of Mathematics, Semiprime
- Eric Weisstein's World of Mathematics, Prime zeta function primezeta(s).
- Index entries for characteristic functions
- Index entries for sequences computed from exponents in factorization of n
Crossrefs
Programs
-
Haskell
a064911 = a010051 . a032742 -- Reinhard Zumkeller, Mar 13 2011
-
Maple
with(numtheory): a:= n-> `if`(bigomega(n)=2, 1, 0): seq(a(n), n=1..120); # Alois P. Heinz, Mar 16 2011
-
Mathematica
Table[If[PrimeOmega[n] == 2, 1, 0], {n, 105}] (* Jayanta Basu, May 25 2013 *)
-
PARI
a(n)=bigomega(n)==2 \\ Charles R Greathouse IV, Mar 13 2011
Formula
a(n) = 1 iff n is in A001358 (semiprimes), a(n) = 0 iff n is in A100959 (non-semiprimes). - Reinhard Zumkeller, Nov 24 2004
Dirichlet g.f.: (primezeta(2s) + primezeta(s)^2)/2. - Franklin T. Adams-Watters, Jun 09 2006
a(n) = A010051(A032742(n)) (i.e., largest proper divisor is prime). - Reinhard Zumkeller, Mar 13 2011
From Antti Karttunen, Apr 24 2018 & Apr 22 2022: (Start)
(End)
a(n) = [Omega(n) = 2], where [ ] is the Iverson bracket. - Wesley Ivan Hurt, Jul 22 2025
Extensions
Edited by M. F. Hasler, Oct 18 2017