OFFSET
1,4
COMMENTS
a(n) = 0 if and only if n == 2 (mod 4). - Robert Israel, Jan 04 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(p^e) = 2*(-1)^(e+1)*((-p)^(e+1)-1)/(p+1)-p^e.
Dirichlet g.f.: zeta(2s)*zeta(s-1)/(zeta(s)^2). - Benedict W. J. Irwin, Jul 11 2018
Sum_{k=1..n} a(k) ~ n^2 / 5. - Vaclav Kotesovec, Feb 01 2019
a(n) = Sum_{k=1..n} (-1)^bigomega(gcd(n,k)). - Ilya Gutkovskiy, Feb 22 2020
Möbius transform of A206369: a(n) = Sum_{d|n} A008683(d) * A206369(n/d). - Amiram Eldar, Aug 28 2023
MAPLE
f:= proc(n) uses numtheory; local d;
add(phi(n/d)*(-1)^bigomega(d), d=divisors(n))
end proc:
map(f, [$1..100]); # Robert Israel, Jan 04 2017
MATHEMATICA
f[d_] := EulerPhi[n/d] LiouvilleLambda[d]
Table[DivisorSum[n, f], {n, 1, 50}] (* Benedict W. J. Irwin, Jul 11 2018 *)
f[p_, e_] := 2*(-1)^(e + 1)*((-p)^(e + 1) - 1)/(p + 1) - p^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 30 2022 *)
PROG
(PARI) a(n) = sumdiv(n, d, eulerphi(n/d)*(-1)^bigomega(d)); \\ Michel Marcus, Jul 11 2018
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Vladeta Jovovic, Sep 27 2002
STATUS
approved