%I #15 Jul 12 2023 11:07:47
%S 1,2,4,8,6,8,8,0,12,10,8,24,8,8,16,0,6,16,12,24,24,16,8,0,24,10,24,32,
%T 0,24,16,0,12,16,16,48,30,8,24,0,24,32,16,24,24,24,16,0,8,18,28,48,24,
%U 24,32,0,48,16,8,72,0,24,32,0,6,32,32,24,48,32,16,0
%N Number of integer solutions to x^2 + 2*y^2 + 2*z^2 = n.
%C Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
%H G. C. Greubel, <a href="/A246631/b246631.txt">Table of n, a(n) for n = 0..5000</a>
%H Mariia Dospolova, Ekaterina Kochetkova, and Eric T. Mortenson, <a href="https://arxiv.org/abs/2307.05244">A new Andrews--Crandall-type identity and the number of integer solutions to x^2+2y^2+2z^2=n</a>, arXiv:2307.05244 [math.NT], 2023.
%H Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>
%F Theta series of quadratic form with Gram matrix [ 1, 0, 0; 0, 2, 0; 0, 0, 2 ].
%F Expansion of phi(q) * phi(q^2)^2 = phi(-q^4)^4 / phi(-q) in powers of q where phi() is a Ramanujan theta function.
%F Expansion of eta(q^2) * eta(q^4)^8 / (eta(q)^2 * eta(q^8)^4) in powers of q.
%F Euler transform of period 8 sequence [ 2, 1, 2, -7, 2, 1, 2, -3, ...].
%F G.f. is a period 1 Fourier series which satisfies f(-1 / (8 t)) = 4 (t/i)^(3/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A014455.
%F G.f.: theta_3(q) * theta_3(q^2)^2.
%F G.f.: Product{k>0} (1 - x^(2*k)) * (1 - x^(4*k))^8 / ((1 - x^k)^2 * (1 - x^(8*k))^4).
%F G.f.: Product{k>0} (1 + x^(2*k)) * (1 + x^k)^2 * (1 - x^(4*k))^3 / (1 + x^(4*k))^4.
%F a(n) = (-1)^floor((n+1) / 2) * A212885(n) = abs(A212885(n)).
%F a(n) = A033717(2*n). a(2*n) = A014455(n). a(2*n + 1) = 2 * A246811(n).
%F a(4*n) = A005875(n). a(4*n + 1) = 2 * A045834(n). a(4*n + 2) = 4 * A045828(n).
%F a(8*n) = A004015(n). a(8*n + 1) = 2 * A213022(n). a(8*n + 2) = 4 * A213625(n). a(8*n + 3) = 8 * A008443(n). a(8*n + 4) = 2 * A045826(n). a(8*n + 5) = 8 * A045831(n). a(8*n + 6) = 8 * A213624(n). a(8*n + 7) = 0.
%e G.f. = 1 + 2*q + 4*q^2 + 8*q^3 + 6*q^4 + 8*q^5 + 8*q^6 + 12*q^8 + 10*q^9 + ...
%t a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q] EllipticTheta[ 3, 0, q^2]^2, {q, 0, n}];
%o (PARI) {a(n) = if( n<1, n==0, 2 * qfrep([ 1, 0, 0; 0, 2, 0; 0, 0, 2], n)[n])};
%o (PARI) {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A) * eta(x^4 + A)^8 / (eta(x + A)^2 * eta(x^8 + A)^4), n))};
%o (Magma) A := Basis( ModularForms( Gamma0(8), 3/2), 80); A[1] + 2*A[2];
%Y Cf. A004015, A005875, A008443, A014455, A033717, A045826, A045828, A045831, A045834, A212885, A213022, A213624, A213625, A246811.
%K nonn
%O 0,2
%A _Michael Somos_, Aug 31 2014