%I #40 Sep 08 2022 08:46:23
%S 1,-5,10,-13,26,-50,50,-45,91,-130,122,-130,170,-250,260,-173,290,
%T -455,362,-338,500,-610,530,-450,651,-850,820,-650,842,-1300,962,-685,
%U 1220,-1450,1300,-1183,1370,-1810,1700,-1170,1682,-2500,1850,-1586,2366
%N a(n) = Sum_{d divides n} (-1)^(d + n/d) * d^2.
%H Seiichi Manyama, <a href="/A321558/b321558.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from G. C. Greubel)
%H Peter Bala, <a href="/A067856/a067856_1.pdf">A signed Dirichlet product of arithmetical functions</a>
%H J. W. L. Glaisher, <a href="https://books.google.com/books?id=bLs9AQAAMAAJ&pg=RA1-PA1">On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares</a>, Quart. J. Math. 38 (1907), 1-62 (see p. 4 and p. 8).
%H <a href="/index/Ge#Glaisher">Index entries for sequences mentioned by Glaisher</a>
%F G.f.: Sum_{k>=1} (-1)^(k+1)*k^2*x^k/(1 + x^k). - _Ilya Gutkovskiy_, Nov 27 2018
%F G.f.: Sum_{k>=1} (-1)^(k+1)*(x^k - x^(2*k))/(1 + x^k)^3. - _Michael Somos_, Oct 24 2019
%F 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
%F From _Peter Bala_, Jan 29 2022: (Start)
%F 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.
%F n^2 = (-1)^(n+1)*Sum_{d divides n} A067856(n/d)*a(d). (End)
%e 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
%t a[n_] := DivisorSum[n, (-1)^(# + n/#)*#^2 &]; Array[a, 50] (* _Amiram Eldar_, Nov 27 2018 *)
%o (PARI) apply( A321558(n)=sumdiv(n, d, (-1)^(n\d-d)*d^2), [1..30]) \\ _M. F. Hasler_, Nov 26 2018
%o (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
%o (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
%Y Column k=2 of A322083.
%Y Glaisher's xi_i (i=0..12): A228441, A109506, A321558, A321559, A321560, A321561, A321562, A321563, A321564, A321565, A321807, A321808, A321809
%Y Cf. A321543 - A321557, A321810 - A321836 for similar sequences.
%Y Cf. A078306, A328667.
%K sign,mult,look
%O 1,2
%A _N. J. A. Sloane_, Nov 23 2018