The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A332794 a(n) = Sum_{d|n} (-1)^(d + 1) * d * phi(n/d). 0
 1, -1, 5, -4, 9, -5, 13, -12, 21, -9, 21, -20, 25, -13, 45, -32, 33, -21, 37, -36, 65, -21, 45, -60, 65, -25, 81, -52, 57, -45, 61, -80, 105, -33, 117, -84, 73, -37, 125, -108, 81, -65, 85, -84, 189, -45, 93, -160, 133, -65, 165, -100, 105, -81, 189 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS 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. 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}] PROG (PARI) a(n) = sumdiv(n, d, (-1)^(d+1)*d*eulerphi(n/d)); \\ Michel Marcus, Feb 24 2020 CROSSREFS Cf. A000010, A018804, A078747, A143520, A181983, A193356, A199084. Sequence in context: A019776 A057763 A198609 * A054508 A110617 A234356 Adjacent sequences:  A332791 A332792 A332793 * A332795 A332796 A332797 KEYWORD sign,mult AUTHOR Ilya Gutkovskiy, Feb 24 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 16 07:59 EDT 2021. Contains 343030 sequences. (Running on oeis4.)