OFFSET
1
COMMENTS
a(n) = 1 if either n is 1 or the number of divisors of n is exactly 4.
LINKS
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
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 13 2022
STATUS
approved