login
a(n) = Sum_{d divides n} (-1)^(d + n/d) * d^4.
3

%I #21 Nov 22 2022 22:00:04

%S 1,-17,82,-241,626,-1394,2402,-3825,6643,-10642,14642,-19762,28562,

%T -40834,51332,-61169,83522,-112931,130322,-150866,196964,-248914,

%U 279842,-313650,391251,-485554,538084,-578882,707282,-872644,923522,-978673,1200644

%N a(n) = Sum_{d divides n} (-1)^(d + n/d) * d^4.

%H G. C. Greubel, <a href="/A321560/b321560.txt">Table of n, a(n) for n = 1..1000</a>

%H J. W. L. Glaisher, <a href="https://books.google.com/books?id=bLs9AQAAMAAJ&amp;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^4*x^k/(1 + x^k). - _Ilya Gutkovskiy_, Nov 27 2018

%F Multiplicative with a(2^e) = -(7*2^(4*e+1) + 31)/15, and a(p^e) = (p^(4*e+4) - 1)/(p^4 - 1) for p > 2. - _Amiram Eldar_, Nov 22 2022

%t a[n_] := DivisorSum[n, (-1)^(# + n/#)*#^4 &]; Array[a, 50] (* _Amiram Eldar_, Nov 27 2018 *)

%o (PARI) apply( A321560(n)=sumdiv(n, d, (-1)^(n\d-d)*d^4), [1..30]) \\ _M. F. Hasler_, Nov 26 2018

%o (Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (&+[(-1)^(k+1)*k^4*x^k/(1 + x^k) : k in [1..2*m]]) )); // _G. C. Greubel_, Nov 28 2018

%o (Sage) s=(sum((-1)^(k+1)*k^4*x^k/(1 + x^k) for k in (1..50))).series(x, 50); a = s.coefficients(x, sparse=False); a[1:] # _G. C. Greubel_, Nov 28 2018

%Y Column k=4 of A322083.

%Y Cf. A321543 - A321565, A321807 - A321836 for similar sequences.

%K sign,mult

%O 1,2

%A _N. J. A. Sloane_, Nov 23 2018