OFFSET
1,2
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = -Sum_{d|n} A106400(d).
a(n) = 0 iff n is in A230851.
a(n) == 1 (mod 2) iff n is a square (A000290).
a(2^n) = n + 1.
a(p*2^n) = 0 when p is an evil prime (A027699).
a(p^2*2^n) = n + 1 when p is an evil prime (A027699) and p^2 is odious, and when p is an odd odious prime (A027697) and p^2 is evil.
a(p^2*2^n) = -(n+1) when p is an evil prime and p^2 is also evil.
a(p^2*2^n) = 3*(n+1) when p is an odd odious prime and p^2 is also odious.
MATHEMATICA
a[n_] := -DivisorSum[n, (-1)^DigitCount[#, 2, 1] &]; Array[a, 100]
PROG
(PARI) a(n) = -sumdiv(n, d, (-1)^hammingweight(d));
CROSSREFS
KEYWORD
sign,base,easy
AUTHOR
Amiram Eldar, Oct 12 2022
STATUS
approved