OFFSET
1,4
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
FORMULA
G.f.: Sum_{k>=1} k^2*x^(k^2)/(1 + x^(k^2)).
a(n) = 1 if n is an odd squarefree (A056911).
a(n) = -1 if n is an even squarefree (A039956).
a(n) = Sum_{d^2|n} (-1)^(n/d^2 + 1) * d^2. - Andrew Howroyd, Jul 20 2018
Multiplicative with a(2^e) = (1 - (-2)^(e + 1))/3, and a(p^e) = (p^(2*floor(e/2 + 1)) - 1)/(p^2 - 1) for an odd prime p. - Amiram Eldar, Oct 25 2020
From Amiram Eldar, Dec 18 2023: (Start)
Dirichlet g.f.: zeta(s) * zeta(2*s-2) * (1 - 1/2^(s-1)).
EXAMPLE
L.g.f.: L(x) = x - x^2/2 + x^3/3 + 3*x^4/4 + x^5/5 - x^6/6 + x^7/7 - 5*x^8/8 + 10*x^9/9 - x^10/10 + ...
exp(L(x)) = 1 + x + x^4 + x^5 + x^9 + x^10 + x^13 + x^14 + ... + A033461(n)*x^n + ...
MATHEMATICA
nmax = 85; Rest[CoefficientList[Series[Log[Product[(1 + x^k^2), {k, 1, Floor[nmax^(1/2) + 1]}]], {x, 0, nmax}], x] Range[0, nmax]]
nmax = 85; Rest[CoefficientList[Series[Sum[k^2 x^k^2/(1 + x^k^2), {k, 1, Floor[nmax^(1/2) + 1]}], {x, 0, nmax}], x]]
Table[DivisorSum[n, (-1)^(n/# + 1) # &, IntegerQ[#^(1/2)] &], {n, 85}]
f[p_, e_] := If[p == 2, (1 - (-2)^(e + 1))/3, (p^(2*Floor[e/2 + 1]) - 1)/(p^2 - 1)]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Oct 25 2020 *)
PROG
(PARI) seq(n)={Vec(deriv(log(prod(k=1, n, (1 + x^(k^2) + O(x*x^n))))))} \\ Andrew Howroyd, Jul 20 2018
(PARI) a(n)={sumdiv(n, d, if(n%d^2, 0, (-1)^(n/d^2 + 1) * d^2))} \\ Andrew Howroyd, Jul 20 2018
CROSSREFS
KEYWORD
sign,mult,easy
AUTHOR
Ilya Gutkovskiy, Mar 13 2018
EXTENSIONS
Keyword:mult added by Andrew Howroyd, Jul 20 2018
STATUS
approved