Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #18 May 13 2022 18:24:58
%S 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,
%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,0
%N a(n) = 1 if the number of divisors of n is either 2 or 4, otherwise 0.
%H Antti Karttunen, <a href="/A353788/b353788.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) = 1 if A010052(n) == 0 [n is not a square] and A000005(n) <= 4, otherwise 0.
%F a(n) = [A084115(n) == 1], where [ ] is the Iverson bracket.
%F a(n) = 1 if A101296(n) is either 2, 4 or 5, otherwise 0.
%F For n > 1, a(n) = A353799(n) - A302048(n).
%t a[n_] := If[MemberQ[{2, 4}, DivisorSigma[0, n]], 1, 0]; Array[a, 120] (* _Amiram Eldar_, May 13 2022 *)
%o (PARI) A353788(n) = (!issquare(n) && (numdiv(n)<=4));
%o (PARI) A353788(n) = (isprime(n) || (4==numdiv(n)));
%Y Characteristic function of A084116.
%Y Cf. A000005, A000290, A010051, A010052, A101296, A302048, A353799.
%Y Cf. also A353787.
%K nonn
%O 1
%A _Antti Karttunen_, May 13 2022