login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = 1 if the product of divisors of n is n^2, otherwise 0.
1

%I #12 Jun 13 2022 20:40:40

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

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

%U 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,1,0,0,0,0,1,0,0,0,1,0,0,1,1,0,0,1,1,0,1

%N a(n) = 1 if the product of divisors of n is n^2, otherwise 0.

%C a(n) = 1 if either n is 1 or the number of divisors of n is exactly 4.

%H Antti Karttunen, <a href="/A354927/b354927.txt">Table of n, a(n) for n = 1..100000</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(1) = 1, and for n > 1, a(n) = [A000005(n) == 4], where [ ] is the Iverson bracket.

%o (PARI) A354927(n) = ((1==n)||(4==numdiv(n)));

%o (PARI) A354927(n) = (n==(factorback(divisors(n))/n));

%o (Python)

%o from sympy import divisor_count

%o def A354927(n): return int(n == 1 or divisor_count(n) == 4) # _Chai Wah Wu_, Jun 13 2022

%Y Characteristic function of A007422.

%Y Cf. A000005, A101296.

%K nonn

%O 1

%A _Antti Karttunen_, Jun 13 2022