login

A354199 revision #13


A354199
a(n) = 1 if in the prime factorization of n there is no prime factor of form 4k+1 and any prime factor of form 4k+3 occurs with an even multiplicity, otherwise 0.
2
1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1
OFFSET
1
FORMULA
a(n) = [A002654(n) == 1] = [A004018(n) == 4], where [ ] is the Iverson bracket.
a(n) = A053866(n) * (1-A353814(n)).
MATHEMATICA
a[1] = 1; a[n_] := If[AllTrue[FactorInteger[n], First[#] == 2 || (Mod[First[#], 4] == 3 && EvenQ[Last[#]]) &], 1, 0]; Array[a, 100] (* Amiram Eldar, May 25 2022 *)
PROG
(PARI) A354199(n) = { my(f=factor(n)); for(k=1, #f~, if((1==(f[k, 1]%4)) || ((3==(f[k, 1]%4))&&(f[k, 2]%2)), return(0))); (1); };
(PARI) A354199(n) = (1==sumdiv( n, d, (d%4==1) - (d%4==3)));
(PARI) A354199(n) = ((issquare(n) || issquare(2*n)) && !A353814(n)); \\ Uses the program given in A353814.
CROSSREFS
Characteristic function of A125853.
Cf. also A353813, A353814.
Sequence in context: A297054 A359349 A266459 * A214509 A053866 A143259
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 25 2022
STATUS
approved