%I #40 Jun 30 2020 05:37:03
%S 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,
%T 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,
%U 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
%N a(n) = 1 if n is a product of exactly 3 (not necessarily distinct) primes, otherwise 0.
%H Antti Karttunen, <a href="/A101605/b101605.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/AlmostPrime.html">Almost Prime</a>.
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>
%F 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.
%F a(n) = floor(Omega(n)/3) * floor(3/Omega(n)). - _Wesley Ivan Hurt_, Jan 10 2013
%e a(28) = 1 because 28 = 2 * 2 * 7 is the product of exactly 3 primes, counted with multiplicity.
%p A101605 := proc(n)
%p if numtheory[bigomega](n) = 3 then
%p 1;
%p else
%p 0;
%p end if;
%p end proc: # _R. J. Mathar_, Mar 13 2015
%t Table[Boole[PrimeOmega[n] == 3], {n, 100}] (* _Jean-François Alcover_, Mar 23 2020 *)
%o (PARI) is(n)=bigomega(n)==3 \\ _Charles R Greathouse IV_, Apr 25 2016
%Y Cf. A010051, A064911, (char funct. of) A014612, A101637, A123074.
%K easy,nonn
%O 1,1
%A _Jonathan Vos Post_, Dec 09 2004
%E Description clarified by _Antti Karttunen_, Jul 23 2017