A101605 a(n) = 1 if n is a product of exactly 3 (not necessarily distinct) primes, otherwise 0.
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0
Offset: 1
Examples
a(28) = 1 because 28 = 2 * 2 * 7 is the product of exactly 3 primes, counted with multiplicity.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Almost Prime.
- Index entries for characteristic functions
- Index entries for sequences computed from exponents in factorization of n
Programs
-
Maple
A101605 := proc(n) if numtheory[bigomega](n) = 3 then 1; else 0; end if; end proc: # R. J. Mathar, Mar 13 2015
-
Mathematica
Table[Boole[PrimeOmega[n] == 3], {n, 100}] (* Jean-François Alcover, Mar 23 2020 *)
-
PARI
is(n)=bigomega(n)==3 \\ Charles R Greathouse IV, Apr 25 2016
Formula
a(n) = 1 if n has exactly three prime factors (not necessarily distinct), else a(n) = 0. a(n) = 1 if n is an element of A014612, else a(n) = 0.
a(n) = floor(Omega(n)/3) * floor(3/Omega(n)). - Wesley Ivan Hurt, Jan 10 2013
Extensions
Description clarified by Antti Karttunen, Jul 23 2017