login
A353788
a(n) = 1 if the number of divisors of n is either 2 or 4, otherwise 0.
3
0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 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, 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, 0
OFFSET
1
FORMULA
a(n) = 1 if A010052(n) == 0 [n is not a square] and A000005(n) <= 4, otherwise 0.
a(n) = [A084115(n) == 1], where [ ] is the Iverson bracket.
a(n) = 1 if A101296(n) is either 2, 4 or 5, otherwise 0.
For n > 1, a(n) = A353799(n) - A302048(n).
MATHEMATICA
a[n_] := If[MemberQ[{2, 4}, DivisorSigma[0, n]], 1, 0]; Array[a, 120] (* Amiram Eldar, May 13 2022 *)
PROG
(PARI) A353788(n) = (!issquare(n) && (numdiv(n)<=4));
(PARI) A353788(n) = (isprime(n) || (4==numdiv(n)));
CROSSREFS
Characteristic function of A084116.
Cf. also A353787.
Sequence in context: A181632 A105565 A332814 * A348737 A285418 A344617
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 13 2022
STATUS
approved