OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000 (terms 1..1000 from G. C. Greubel)
J. W. L. Glaisher, On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares, Quart. J. Math. 38 (1907), 1-62 (see p. 4 and p. 8).
FORMULA
G.f.: Sum_{k>=1} (-1)^(k+1)*k^2*x^k/(1 + x^k). - Ilya Gutkovskiy, Nov 27 2018
G.f.: Sum_{k>=1} (-1)^(k+1)*(x^k - x^(2*k))/(1 + x^k)^3. - Michael Somos, Oct 24 2019
a(n) = -(-1)^n A328667(n). a(2*n + 1) = A078306(2*n + 1). a(2*n) = A078306(2*n) - 8*A078306(n). - Michael Somos, Oct 24 2019
From Peter Bala, Jan 29 2022: (Start)
Multiplicative with a(2^k) = - (2^(2*k+1) + 7)/3 for k >= 1 and a(p^k) = (p^(2*k+2) - 1)/(p^2 - 1) for odd prime p.
n^2 = (-1)^(n+1)*Sum_{d divides n} A067856(n/d)*a(d). (End)
EXAMPLE
G.f. = x - 5*x^2 + 10*x^3 - 13*x^4 + 26*x^5 - 50*x^6 + 50*x^7 + ... - Michael Somos, Oct 24 2019
MATHEMATICA
a[n_] := DivisorSum[n, (-1)^(# + n/#)*#^2 &]; Array[a, 50] (* Amiram Eldar, Nov 27 2018 *)
PROG
(PARI) apply( A321558(n)=sumdiv(n, d, (-1)^(n\d-d)*d^2), [1..30]) \\ M. F. Hasler, Nov 26 2018
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (&+[(-1)^(k+1)*k^2*x^k/(1 + x^k) : k in [1..2*m]]) )); // G. C. Greubel, Nov 28 2018
(Sage) s=(sum((-1)^(k+1)*k^2*x^k/(1 + x^k) for k in (1..50))).series(x, 30); a = s.coefficients(x, sparse=False); a[1:] # G. C. Greubel, Nov 28 2018
CROSSREFS
KEYWORD
AUTHOR
N. J. A. Sloane, Nov 23 2018
STATUS
approved