OFFSET
1,3
LINKS
Olivier Bordelles, A Multidimensional Cesaro Type Identity and Applications, J. Int. Seq. 18 (2015) # 15.3.7.
FORMULA
G.f.: Sum_{k>=1} phi(k) * x^k / (1 + x^k)^2.
Dirichlet g.f.: zeta(s-1)^2 * (1 - 2^(2 - s)) / zeta(s).
a(n) = Sum_{k=1..n} gcd(n, k) if n odd, Sum_{k=1..n} (-1)^(k + 1) * gcd(n, k) if n even.
From Amiram Eldar, Nov 04 2022: (Start)
Multiplicative with a(2^e) = -e*2^(e-1), and a(p^e) = (e*(p-1) + p)*p^(e-1) for p > 2.
Sum_{k=1..n} a(k) ~ c * n^2, where c = 3*log(2)/Pi^2 = 0.210691... . (End)
a(2*n) = - Sum_{k = 1..n} gcd(2*k, n) = - A344372(n); a(2*n+1) = A018804(2*n+1). - Peter Bala, Jan 11 2024
a(n) = Sum_{k = 1..n} (-1)^(1 + gcd(k, n)) * gcd(k, n) (follows from an identity of Cesàro. See, for example, Bordelles, Lemma 1). - Peter Bala, Jan 16 2024
MATHEMATICA
a[n_] := Sum[(-1)^(d + 1) d EulerPhi[n/d], {d, Divisors[n]}]; Table[a[n], {n, 1, 55}]
nmax = 55; CoefficientList[Series[Sum[EulerPhi[k] x^k/(1 + x^k)^2, {k, 1, nmax}], {x, 0, nmax}], x] // Rest
a[n_] := If[OddQ[n], Sum[GCD[n, k], {k, 1, n}], Sum[(-1)^(k + 1) GCD[n, k], {k, 1, n}]]; Table[a[n], {n, 1, 55}]
f[p_, e_] := (e*(p-1) + p)*p^(e-1); f[2, e_] := -e*2^(e-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 04 2022 *)
PROG
(PARI) a(n) = sumdiv(n, d, (-1)^(d+1)*d*eulerphi(n/d)); \\ Michel Marcus, Feb 24 2020
CROSSREFS
KEYWORD
sign,mult,easy
AUTHOR
Ilya Gutkovskiy, Feb 24 2020
STATUS
approved