OFFSET
1,2
COMMENTS
The sign of a(n) is (-1)^(bigomega(n)) = (-1)^(A001222(n)). - David A. Corneth, Jun 27 2018
LINKS
Daniel Suteu, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(p^e) = (1+(-1)^e*p^(2*e+2))/(1+p^2).
Dirichlet g.f.: zeta(s)*zeta(2*s-4)/zeta(s-2).
More generally, if b(n, k) = Sum_{d divides n} d^k*(-1)^bigomega(d) then b(n, k) is multiplicative and b(p^e, k) = (1+(-1)^e*p^(k*(e+1)))/(1+p^k).
Dirichlet g.f. for b(n, k): zeta(s)*zeta(2*s-2*k)/zeta(s-k).
a(n) = (-1)^bigomega(n) * Sum_{d|n, d is a perfect square} A007434(n/d). - Daniel Suteu, Jun 27 2018
Sum_{k=1..n} |a(k)| ~ n^3 * zeta(6)/(3*zeta(3)). - Daniel Suteu, Apr 06 2019
Dirichlet g.f. for |a(n)|: zeta(s-2)*zeta(2*s)/zeta(s). - Vaclav Kotesovec, Apr 06 2019
EXAMPLE
As 12 = 2^2 * 3, a(12) = a(2^2) * a(3) = (1+(-1)^2*2^(2*2+2))/(1+2^2) * (1+(-1)^1*3^(2*1+2))/(1+3^2) = 13 * -8 = -104. - David A. Corneth, Jun 27 2018
MATHEMATICA
Array[DivisorSum[#, #^2*(-1)^PrimeOmega[#] &] &, 50] (* Michael De Vlieger, Jun 27 2018 *)
f[p_, e_] := (1 + (-1)^e*p^(2*e+2))/(1 + p^2); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 27 2023 *)
PROG
(PARI) a(n) = sumdiv(n, d, d^2 * (-1)^bigomega(d)); \\ Daniel Suteu, Jun 27 2018
(PARI) a(n) = my(f=factor(n)); prod(k=1, #f~, ((-1)^f[k, 2] * f[k, 1]^(2 * f[k, 2] + 2) + 1) / (1 + f[k, 1]^2)); \\ Daniel Suteu, Jun 27 2018
CROSSREFS
KEYWORD
mult,sign,easy
AUTHOR
Vladeta Jovovic, Nov 16 2002
STATUS
approved