%I #56 Jun 24 2024 08:48:26
%S 1,1,-80,1,626,-80,-2400,1,6481,626,-14640,-80,28562,-2400,-50080,1,
%T 83522,6481,-130320,626,192000,-14640,-279840,-80,391251,28562,
%U -524960,-2400,707282,-50080,-923520,1,1171200,83522,-1502400,6481,1874162,-130320
%N a(n) = Sum_{d|n, d==1 mod 4} d^4 - Sum_{d|n, d==3 mod 4} d^4.
%C Multiplicative because it is the Inverse Möbius transform of [1 0 -3^4 0 5^4 0 -7^4 ...], which is multiplicative. - _Christian G. Bower_, May 18 2005
%C Called E_4(n) by Hardy.
%C Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
%D E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 120.
%D G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Chelsea Publishing Company, New York 1959, p. 135 section 9.3. MR0106147 (21 #4881)
%H Vincenzo Librandi, <a href="/A050456/b050456.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&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 Ken Ono, Sinai Robins, and Patrick T. Wahl, <a href="https://doi.org/10.1007/BF01831114">On the representation of integers as sums of triangular numbers</a>, Aequationes mathematicae, Volume 50, Issue 1-2 (August 1995), pp. 73-94. Case k=10; <a href="https://web.archive.org/web/20190712123047/http://www.mathcs.emory.edu/~ono/publications-cv/pdfs/006.pdf">Author's copy</a>. [Wayback Machine link]
%H Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>, 2019.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>.
%H <a href="/index/Ge#Glaisher">Index entries for sequences mentioned by Glaisher</a>.
%F Expansion of ( eta(q)^4 * eta(q^2)^2 * (5 * eta(q)^8 / eta(q^4)^4 + 64 * q * eta(q^4)^4 ) - 5) / 4 in powers of q. - _Michael Somos_, Jan 14 2012
%F Expansion of (phi(x)^2 * (5 * phi(-x)^8 + 64 * x * psi(-x)^8) - 5) / 4 in powers of x where phi(), psi() are Ramanujan theta functions. - _Michael Somos_, Jan 14 2012
%F a(n) is multiplicative with a(2^e) = 1, a(p^e) = ((p^4)^(e+1) - 1) / (p^4 - 1) if p == 1 (mod 4), a(p^e) = (1 - (-p^4)^(e+1)) / (1 + p^4) if p == 3 (mod 4). - _Michael Somos_, Jan 14 2012
%F G.f.: Sum_{k>0} (-1)^(k-1) * (2*k - 1)^4 * x^(2*k - 1) / (1 - x^(2*k - 1)).
%F a(n) = Sum_{d|n} Chi(d)*d^4, with Chi(n) the second Dirichlet character modulo 4, i.e., Chi(1) = 1 and Chi(3) = -1. See the Ono et al ref. case k=10. - _Wolfdieter Lang_, Jan 13 2017
%F a(n) = Sum_{d|n} d^4*sin(d*Pi/2). - _Ridouane Oudra_, Jun 23 2024
%e G.f. = x + x^2 - 80*x^3 + x^4 + 626*x^5 - 80*x^6 - 2400*x^7 + x^8 + 6481*x^9 + ...
%t e[r_,n_] := Plus@@(Select[Divisors[n], Mod[#,4] == 1 &]^r) -Plus@@(Select[Divisors[n], Mod[#,4] == 3 &]^r); e[4,#] &/@Range[38] (* _Ant King_, Nov 10 2012 *)
%t f[p_, e_] := If[Mod[p, 4] == 1, ((p^4)^(e+1)-1)/(p^4-1), ((-p^4)^(e+1)-1)/(-p^4-1)]; f[2, e_] := 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 60] (* _Amiram Eldar_, Sep 27 2023 *)
%o (PARI) {a(n) = if( n<1, 0, sumdiv( n, d, (d%2) * (-1)^((d-1)/2) * d^4))}; /* _Michael Somos_, Sep 12 2005 */
%o (PARI) {a(n) = if( n<1, 0, sumdiv( n, d, d^4 * kronecker( -4, d)))};
%o (PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( ( eta(x + A)^4 * eta(x^2 + A)^2 * (5 * eta(x + A)^8 / eta(x^4 + A)^4 + 64 * x * eta(x^4 + A)^4 ) - 5) / 4, n))}; /* _Michael Somos_, Jan 14 2012 */
%Y Cf. A000122, A000700, A010054, A121373.
%K sign,easy,mult
%O 1,3
%A _N. J. A. Sloane_, Dec 23 1999