login
A354927
a(n) = 1 if the product of divisors of n is n^2, otherwise 0.
1
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, 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, 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
OFFSET
1
COMMENTS
a(n) = 1 if either n is 1 or the number of divisors of n is exactly 4.
FORMULA
a(1) = 1, and for n > 1, a(n) = [A000005(n) == 4], where [ ] is the Iverson bracket.
PROG
(PARI) A354927(n) = ((1==n)||(4==numdiv(n)));
(PARI) A354927(n) = (n==(factorback(divisors(n))/n));
(Python)
from sympy import divisor_count
def A354927(n): return int(n == 1 or divisor_count(n) == 4) # Chai Wah Wu, Jun 13 2022
CROSSREFS
Characteristic function of A007422.
Sequence in context: A353350 A354097 A374051 * A173861 A359464 A011746
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 13 2022
STATUS
approved