OFFSET
1,3
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
FORMULA
G.f.: Sum_{k>=1} mu(k)^2*k*x^k/(1 + x^k).
a(n) = n + 1 if n is an odd prime (A065091).
Multiplicative with a(2^e) = 1 if e = 1, and -3 otherwise, and a(p^e) = p+1 for an odd prime p. - Amiram Eldar, Oct 25 2020
Sum_{k=1..n} a(k) ~ n^2/4. - Amiram Eldar, Nov 20 2022
EXAMPLE
L.g.f.: L(x) = x + x^2/2 + 4*x^3/3 - 3*x^4/4 + 6*x^5/5 + 4*x^6/6 + 8*x^7/7 - 3*x^8/8 + 4*x^9/9 + 6*x^10/10 + ...
exp(L(x)) = 1 + x + x^2 + 2*x^3 + x^4 + 2*x^5 + 3*x^6 + 3*x^7 + 4*x^8 + 4*x^9 + 5*x^10 + ... + A087188(n)*x^n + ...
MATHEMATICA
nmax = 75; Rest[CoefficientList[Series[Log[Product[(1 + MoebiusMu[k]^2 x^k), {k, 1, nmax}]], {x, 0, nmax}], x] Range[0, nmax]]
nmax = 75; Rest[CoefficientList[Series[Sum[MoebiusMu[k]^2 k x^k/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x]]
Table[DivisorSum[n, (-1)^(n/# + 1) # &, SquareFreeQ[#] &], {n, 75}]
f[p_, e_] := If[p == 2, If[e == 1, 1, -3], p + 1]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Oct 25 2020 *)
PROG
(PARI) seq(n)=Vec(sum(k=1, n, moebius(k)^2*k*x^k/(1 + x^k) + O(x*x^n))); \\ Andrew Howroyd, Jul 20 2018
(PARI) a(n)={sumdiv(n, d, if(issquarefree(d), (-1)^(n/d + 1) * d))} \\ Andrew Howroyd, Jul 20 2018
CROSSREFS
KEYWORD
sign,mult,easy
AUTHOR
Ilya Gutkovskiy, Mar 14 2018
EXTENSIONS
Keyword:mult added by Andrew Howroyd, Jul 20 2018
STATUS
approved