OFFSET
1,3
COMMENTS
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
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
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)*(2*k - 1)^3*x^(2*k-1)/(1 - x^(2*k-1)). - Ilya Gutkovskiy, Dec 22 2018
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
a(n) = Sum_{d|n} d^3*sin(d*Pi/2). - Ridouane Oudra, Jun 02 2024
MAPLE
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:
seq(A050459(n), n=1..100) ; # R. J. Mathar, Jan 07 2011
MATHEMATICA
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 *)
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 *)
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
N. J. A. Sloane, Dec 23 1999
STATUS
approved