login

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”).

A342025
a(n) = 1 if n has the same numbers of prime factors of forms 4*k+1 and 4*k+3 when counted with multiplicity, otherwise 0.
3
1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 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, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1
OFFSET
1
MATHEMATICA
{1}~Join~Table[Boole[Count[#, 1] == Count[#, 3]] &@ Mod[Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[n]], 4], {n, 2, 120}] (* Michael De Vlieger, Mar 11 2021 *)
PROG
(PARI) A342025(n) = {my(f = factor(n)); sum(k=1, #f~, ((f[k, 1] % 4)==1)*f[k, 2]) == sum(k=1, #f~, ((f[k, 1] % 4)==3)*f[k, 2]); }; \\ From isok function in A072202
(Python)
from sympy import factorint
def A342025(n):
f = factorint(n)
return int(sum(b for a, b in f.items() if a % 4 == 3) == sum(b for a, b in f.items() if a % 4 == 1)) # Chai Wah Wu, Mar 09 2021
CROSSREFS
Characteristic function of A072202.
Sequence in context: A036987 A354193 A354188 * A353518 A353687 A354918
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 09 2021
STATUS
approved