%I #47 Aug 29 2024 09:15:31
%S 1,4,8,16,24,24,32,32,24,52,48,48,96,56,64,96,24,72,104,80,144,128,96,
%T 96,96,124,112,160,192,120,192,128,24,192,144,192,312,152,160,224,144,
%U 168,256,176,288,312,192,192,96,228,248,288,336,216,320,288,192,320,240,240
%N Number of integer solutions to a^2 + b^2 + 2*c^2 + 2*d^2 = n.
%C a^2 + b^2 + 2*c^2 + 2*d^2 is another (cf. A000118) of Ramanujan's 54 universal quaternary quadratic forms. - _Michael Somos_, Apr 01 2008
%D B. C. Berndt, Ramanujan's Notebooks Part V, Springer-Verlag, see p. 373 Entry 31.
%D Jesse Ira Deutsch, Bumby's technique and a result of Liouville on a quadratic form, Integers 8 (2008), no. 2, A2, 20 pp. MR2438287 (2009g:11047).
%D N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 78, Eq. (32.29).
%D S. Ramanujan, Collected Papers, Chap. 20, Cambridge Univ. Press 1927 (Proceedings of the Camb. Phil. Soc., 19 (1917), 11-21).
%H Seiichi Manyama, <a href="/A097057/b097057.txt">Table of n, a(n) for n = 0..10000</a>
%H Jesse Ira Deutsch, <a href="https://doi.org/10.1016/j.jnt.2004.08.014">A quaternionic proof of the representation formula of a quaternary quadratic form</a>, J. Number Theory 113 (2005), no. 1, 149-174. MR2141762 (2006b:11033).
%H Y. Mimura, <a href="https://web.archive.org/web/20120325102138/http://www.kobepharma-u.ac.jp/~math/notes/note01.html">Almost Universal Quadratic Forms</a>.
%H Olivia X. M. Yao and Ernest X. W. Xia, <a href="https://doi.org/10.1016/j.disc.2013.11.011">Combinatorial proofs of five formulas of Liouville</a>, Discrete Math. 318 (2014), 1-9. MR3141622.
%F Euler transform of period 8 sequence [4, -2, 4, -8, 4, -2, 4, -4, ...]. - _Michael Somos_, Sep 17 2004
%F Multiplicative with a(n) = 4*b(n), b(2) = 2, b(2^e) = 6 if e > 1, b(p^e) = (p^(e+1) - 1) / (p - 1) if p > 2. - _Michael Somos_, Sep 17 2004
%F Expansion of (eta(q^2) * eta(q^4))^6 / (eta(q) * eta(q^8))^4 in powers of q.
%F G.f. is a period 1 Fourier series which satisfies f(-1 / (8 t)) = 8 (t/i)^2 f(t) where q = exp(2 Pi i t). - _Michael Somos_, Jul 05 2011
%F G.f.: (theta_3(q) * theta_3(q^2))^2.
%F G.f.: Product_{k>0} ((1-x^(2k))(1-x^(4k)))^6/((1-x^k)(1-x^(8k)))^4.
%F G.f.: 1 + Sum_{k>0} 8 * x^(4*k) / (1 + x^(4*k))^2 + 4 * x^(2*k-1) / (1 - x^(2*k-1))^2 = 1 + Sum_{k>0} (2 + (-1)^k) * 4*k * x^(2*k) / (1 + x^(2*k)) + 4*(2*k - 1) * x^(2*k-1) / (1 - x^(2*k - 1)). - _Michael Somos_, Oct 22 2005
%F a(2*n) = A000118(n). a(2*n + 1) = 4 * A008438(n). a(4*n) = A004011(n). a(4*n + 1) = 4 * A112610(n). a(4*n + 2) = 8 * A008438(n). a(4*n + 3) = 16 * A097723(n). - _Michael Somos_, Jul 05 2011
%e 1 + 4*q + 8*q^2 + 16*q^3 + 24*q^4 + 24*q^5 + 32*q^6 + 32*q^7 + 24*q^8 + ...
%t a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] EllipticTheta[ 3, 0, q^2])^2, {q, 0, n}] (* _Michael Somos_, Jul 05 2011 *)
%t f[p_, e_] := (p^(e+1)-1)/(p-1); f[2, 1] = 2; f[2, e_] := 6; a[0] = 1; a[1] = 4; a[n_] := 4 * Times @@ f @@@ FactorInteger[n]; Array[a, 100, 0] (* _Amiram Eldar_, Aug 22 2023 *)
%o (PARI) {a(n) = local(t); if( n<1, n>=0, t = 2^valuation( n, 2); 4 * sigma(n/t) * if( t>2, 6, t))} \\ _Michael Somos_, Sep 17 2004
%o (PARI) {a(n) = local(A = x * O(x^n)); polcoeff( (eta(x^2 + A) * eta(x^4 + A))^6 / (eta(x + A) * eta(x^8 + A))^4, n)} \\ _Michael Somos_, Sep 17 2004
%o (PARI) {a(n) = if( n<1, n==0, 2 * qfrep([ 1, 0, 0, 0; 0, 1, 0, 0; 0, 0, 2, 0; 0, 0, 0, 2], n)[n])} \\ _Michael Somos_, Oct 29 2005
%o (PARI) A097057(n)=if(n,sigma(n>>n=valuation(n,2))*if(n>1,24,4<<n),1) \\ _M. F. Hasler_, May 07 2018
%Y a^2 + b^2 + 2*c^2 + m*d^2 = n: this sequence (m=2), A320124 (m=3), A320125 (m=4), A320126 (m=5), A320127 (m=6), A320128 (m=7), A320130 (m=8), A320131 (m=9), A320132 (m=10), A320133 (m=11), A320134 (m=12), A320135 (m=13), A320136 (m=14).
%Y Cf. A000118, A004011, A008438, A097723, A112610.
%K nonn,mult
%O 0,2
%A _N. J. A. Sloane_, Sep 15 2004
%E Added keyword mult and minor edits by _M. F. Hasler_, May 07 2018