login
a(n) = Sum_{d|n, d==1 mod 4} d^3 - Sum_{d|n, d==3 mod 4} d^3.
2

%I #34 Jun 02 2024 14:40:14

%S 1,1,-26,1,126,-26,-342,1,703,126,-1330,-26,2198,-342,-3276,1,4914,

%T 703,-6858,126,8892,-1330,-12166,-26,15751,2198,-18980,-342,24390,

%U -3276,-29790,1,34580,4914,-43092,703,50654,-6858,-57148,126,68922,8892,-79506,-1330

%N a(n) = Sum_{d|n, d==1 mod 4} d^3 - Sum_{d|n, d==3 mod 4} d^3.

%C Multiplicative because it is the Inverse Möbius transform of [1 0 -3^3 0 5^3 0 -7^3 ...], which is multiplicative. - _Christian G. Bower_, May 18 2005

%H Seiichi Manyama, <a href="/A050459/b050459.txt">Table of n, a(n) for n = 1..10000</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 a(n) = A050451(n) - A050454(n).

%F G.f.: Sum_{k>=1} (-1)^(k-1)*(2*k - 1)^3*x^(2*k-1)/(1 - x^(2*k-1)). - _Ilya Gutkovskiy_, Dec 22 2018

%F Multiplicative with a(2^e) = 1, and for an odd prime p, ((p^3)^(e+1)-1)/(p^3-1) if p == 1 (mod 4) and ((-p^3)^(e+1)-1)/(-p^3-1) if p == 3 (mod 4). - _Amiram Eldar_, Sep 27 2023

%F a(n) = Sum_{d|n} d^3*sin(d*Pi/2). - _Ridouane Oudra_, Jun 02 2024

%p A050459 := proc(n) local a; a := 0 ; for d in numtheory[divisors](n) do if d mod 4 = 1 then a := a+d^3 ; elif d mod 4 = 3 then a := a-d^3 ; end if; end do; a ; end proc:

%p seq(A050459(n),n=1..100) ; # _R. J. Mathar_, Jan 07 2011

%t s[n_, r_] := DivisorSum[n, #^3 &, Mod[#, 4]==r &]; a[n_] := s[n, 1] - s[n, 3]; Array[a, 30] (* _Amiram Eldar_, Dec 06 2018 *)

%t f[p_, e_] := If[Mod[p, 4] == 1, ((p^3)^(e+1)-1)/(p^3-1), ((-p^3)^(e+1)-1)/(-p^3-1)]; f[2, e_] := 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 60] (* _Amiram Eldar_, Sep 27 2023 *)

%Y Column k=3 of A322143.

%Y Glaisher's E_i (i=0..12): A002654, A050457, A002173, A050459, A050456, A321821, A321822, A321823, A321824, A321825, A321826, A321827, A321828.

%Y Cf. A050451, A050454.

%K sign,easy,mult

%O 1,3

%A _N. J. A. Sloane_, Dec 23 1999