%I #61 Nov 23 2023 08:01:37
%S 1,1,0,2,1,0,2,0,0,2,2,0,1,1,0,2,0,0,2,2,0,2,0,0,3,0,0,0,2,0,2,2,0,2,
%T 0,0,2,1,0,2,1,0,0,0,0,4,2,0,2,0,0,2,0,0,2,2,0,0,2,0,1,0,0,2,2,0,4,0,
%U 0,2,0,0,0,3,0,2,0,0,2,0,0,2,0,0,3,2,0
%N Product t2(q^d); d | 3, where t2 = theta2(q) / (2 * q^(1/4)).
%C Number of solutions of 8*n + 4 = x^2 + 3*y^2 in positive odd integers. - _Michael Somos_, Sep 18 2004
%C Half the number of integer solutions of 4*n + 2 = x^2 + y^2 + z^2 where 0 = x + y + z and x and y are odd. - _Michael Somos_, Jul 03 2011
%C Given g.f. A(x), then q^(1/2) * 2 * A(q) is denoted phi_1(z) where q = exp(Pi i z) in Conway and Sloane.
%C Half of theta series of planar hexagonal lattice (A2) with respect to an edge.
%C Bisection of A002324. Number of ways of writing n as a sum of a triangular plus three times a triangular number [Hirschhorn]. - _R. J. Mathar_, Mar 23 2011
%C Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
%C Cubic AGM theta functions: a(q) (see A004016), b(q) (A005928), c(q) (A005882).
%D Burce C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, 1991, see p. 223 Entry 3(i).
%D J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, 1999, p. 103. See Eq. (13).
%D Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 78, Eq. (32.27).
%H Alois P. Heinz, <a href="/A033762/b033762.txt">Table of n, a(n) for n = 0..10000</a>
%H Michael D. Hirschhorn, <a href="http://www.mat.univie.ac.at/~slc/wpapers/s42hirsch.html">Three classical results on representations of a number</a>, Sem. Lotharingien de Combinat. S42 (1999), B42f.
%H Michael D. Hirschhorn, <a href="http://dx.doi.org/10.1016/j.disc.2004.08.045">The number of representations of a number by various forms</a>, Discrete Mathematics 298 (2005), 205-211.
%H Michael Somos, <a href="/A033762/a033762.pdf">Introduction to Ramanujan theta functions</a>, 2010.
%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>.
%F Expansion of q^(-1/2) * (eta(q^2) * eta(q^6))^2 / (eta(q) * eta(q^3)) in powers of q. - _Michael Somos_, Apr 18 2004
%F Expansion of q^(-1) * (a(q) - a(q^4)) / 6 in powers of q^2 where a() is a cubic AGM theta function. - _Michael Somos_, Oct 24 2006
%F Expansion of psi(x) * psi(x^3) in powers of x where psi() is a Ramanujan theta function. - _Michael Somos_, Jul 03 2011
%F Euler transform of period 6 sequence [ 1, -1, 2, -1, 1, -2, ...]. - _Michael Somos_, Apr 18 2004
%F From _Michael Somos_, Sep 18 2004: (Start)
%F Given g.f. A(x), then B(x) = (x * A(x^2))^2 satisfies 0 = f(B(x), B(x^2), B(x^4)) where f(u, v, w) = v^3 + 4*u*v*w + 16*v*w^2 - 8*w*v^2 - w*u^2.
%F a(n) = b(2*n + 1) where b() is multiplicative with b(2^e) = 0^e, b(3^e) = 1, b(p^e) = (1 + (-1)^e) / 2 if p==5 (mod 6) otherwise b(p^e) = e+1. (Clarification: the g.f. A(x) is not the primary function of interest, but rather B(x) = x * A(x^2), which is an eta-quotient and is the generating function of a multiplicative sequence.)
%F G.f.: (Sum_{j>0} x^((j^2 - j) / 2)) * (Sum_{k>0} x^(3(k^2 - k) / 2)) = Product_{k>0} (1 + x^k) * (1 - x^(2*k)) * (1 + x^(3*k)) * (1 - x^(6*k)).
%F G.f.: Sum_{k>=0} a(k) * x^(2*k + 1) = Sum_{k>0} x^k * (1 - x^k) * (1 - x^(4*k)) * (1 - x^(5*k)) / (1 - x^(12*k)). (End)
%F G.f.: s(4)^2*s(12)^2/(s(2)*s(6)), where s(k) := subs(q=q^k, eta(q)), where eta(q) is Dedekind's function, cf. A010815. [Fine]
%F G.f.: Sum_{k>=0} a(k) * x^(2*k + 1) = Sum_{k>0} x^k / (1 + x^k + x^(2*k)) - x^(4*k) / (1 + x^(4*k) + x^(8*k)). - _Michael Somos_, Nov 04 2005
%F a(n) = A002324(2*n + 1) = A035178(2*n + 1) = A091393(2*n + 1) = A093829(2*n + 1) = A096936(2*n + 1) = A112298(2*n + 1) = A113447(2*n + 1) = A113661(2*n + 1) = A113974(2*n + 1) = A115979(2*n + 1) = A122860(2*n + 1) = A123331(2*n + 1) = A123484(2*n + 1) = A136748(2*n + 1) = A137608(2*n + 1). A005881(n) = 2*a(n).
%F 6 * a(n) = A004016(6*n + 3). - _Michael Somos_, Mar 06 2016
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/(2*sqrt(3)) = 0.906899... (A093766). - _Amiram Eldar_, Nov 23 2023
%e G.f. = 1 + x + 2*x^3 + x^4 + 2*x^6 + 2*x^9 + 2*x^10 + x^12 + x^13 + 2*x^15 + ...
%e G.f. = q + q^3 + 2*q^7 + q^9 + 2*q^13 + 2*q^19 + 2*q^21 + q^25 + q^27 + 2*q^31 + ...
%e a(6) = 2 since 8*6 + 4 = 52 = 5^2 + 3*3^2 = 7^2 + 3*1^2.
%t a[ n_] := If[ n < 0, 0, DivisorSum[ 2 n + 1, Mod[(3 - #)/2, 3, -1] &]]; (* _Michael Somos_, Jul 03 2011 *)
%t QP = QPochhammer; s = (QP[q^2]*QP[q^6])^2/(QP[q]*QP[q^3]) + O[q]^100; CoefficientList[s, q] (* _Jean-François Alcover_, Nov 27 2015, adapted from PARI *)
%t a[ n_] := If[ n < 1, Boole[n == 0], Times @@ (Which[# < 2, 0^#2, Mod[#, 6] == 5, 1 - Mod[#2, 2], True, #2 + 1] & @@@ FactorInteger@(2 n + 1))]; (* _Michael Somos_, Mar 06 2016 *)
%t %t A033762 a[ n_] := SeriesCoefficient[ (1/4) x^(-1/2) EllipticTheta[ 2, 0, x^(1/2)] EllipticTheta[ 2, 0, x^(3/2)], {x, 0, n}]; (* _Michael Somos_, Mar 06 2016 *)
%o (PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A) * eta(x^6 + A))^2 / (eta(x + A) * eta(x^3 + A)), n))}; /* _Michael Somos_, Sep 18 2004 */
%o (PARI) {a(n) = if( n<0, 0, n = 2*n + 1; sumdiv( n, d, kronecker( -12, d) * (n / d % 2)))}; /* _Michael Somos_, Nov 04 2005 */
%o (PARI) {a(n) = if( n<0, 0, n = 8*n + 4; sum( j=1, sqrtint( n\3), (j%2) * issquare(n - 3*j^2)))} /* _Michael Somos_, Nov 04 2005 */
%o (PARI) {a(n) = if( n<0, 0, sumdiv(2*n + 1, d, kronecker(-3, d)))}; /* _Michael Somos_, Mar 06 2016 */
%o (Magma) A := Basis( ModularForms( Gamma1(12), 1), 202); A[2] + A[4]; /* _Michael Somos_, Jul 25 2014 */
%Y Cf. A002324, A004016, A005881, A035178, A091393, A093766, A093829, A096936, A112298, A113447, A113661, A113974, A115979, A122860, A123331, A123484, A136748, A137608.
%Y Cf. A000122, A000700, A010054, A121373.
%K nonn
%O 0,4
%A _N. J. A. Sloane_
%E Corrected by _Charles R Greathouse IV_, Sep 02 2009