login
a(n) = 1 if n is a prime or a squarefree semiprime, otherwise 0.
2

%I #12 Apr 22 2022 06:03:21

%S 0,1,1,0,1,1,1,0,0,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,0,1,0,0,1,0,1,0,1,1,

%T 1,0,1,1,1,0,1,0,1,0,0,1,1,0,0,0,1,0,1,0,1,0,1,1,1,0,1,1,0,0,1,0,1,0,

%U 1,0,1,0,1,1,0,0,1,0,1,0,0,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,0,0,1,0,1,0,0,1,1,0,1,0,1,0,1,0,1,0,0,1,1,0

%N a(n) = 1 if n is a prime or a squarefree semiprime, otherwise 0.

%C a(n) = 1 if the number of the divisors of n, tau(n), is equal to the twice number of distinct prime factors of n, 2*omega(n), otherwise 0.

%H Antti Karttunen, <a href="/A353471/b353471.txt">Table of n, a(n) for n = 1..65537</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) = A010051(n) + A280710(n).

%F a(n) = [A000005(n) == 2*A001221(n)], where [ ] is the Iverson bracket.

%o (PARI) A353471(n) = (numdiv(n)==2*omega(n));

%Y Characteristic function of A167171, the union of primes (A000040) and squarefree semiprimes (A006881).

%Y Cf. A000005, A001221, A010051, A280710.

%K nonn

%O 1

%A _Antti Karttunen_, Apr 21 2022