OFFSET
0,2
COMMENTS
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
a(n) is the number of solutions in integers to n = x^2 + y^2 + z^2 + w^2 where x + y + z = 3m is a multiple of 3. - Michael Somos, Jun 23 2018
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..10000
Michael Somos, Introduction to Ramanujan theta functions, 2019.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions.
FORMULA
Expansion of a(x^2) * phi(x) * phi(x^3) in powers of x where a() is a cubic AGM theta function and phi() is a Ramanujan theta function.
Expansion of (chi(x) * chi(x^3))^3 * (psi(x)^4 + 3*x*psi(x^3)^4) in powers of x where psi(), chi() are Ramanujan theta functions.
a(n) = 2*b(n) where b() is multiplicative with a(0) = 1, b(2^e) = 3 if e>0, b(3^e) = 3^(e+1) - 2, b(p^e) = (p^(e+1) - 1 / (p - 1) if p>3.
G.f. is a period 1 Fourier series which satisfies f(-1 / (12 t)) = 12 (t/i)^2 f(t) where q = exp(2 Pi i t).
G.f.: ((Sum_{k in Z} x^k^2)^4 + 3 * (Sum_{k in Z} x^(3*k^2))^4) / 4.
G.f.: 1 + 2 * Sum_{k>0} F(k, x) + 6 * Sum_{k>0} F(3*k, x) where F(k, x) = x^k / (1 + (-x)^k)^2.
G.f.: 1 + 2 * Sum_{k>0} F(k, x) + 2 * Sum_{k>0} F(3*k, x) where F(k, x) = k * x^k / (1 + (-x)^k).
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^2/6 = 1.644934... (A013661). - Amiram Eldar, Dec 29 2023
EXAMPLE
G.f. = 1 + 2*x + 6*x^2 + 14*x^3 + 6*x^4 + 12*x^5 + 42*x^6 + 16*x^7 + 6*x^8 + ...
a(4) = 6 with solutions (x, y, z, w) = {(1, 1, 1, 1), (1, 1, 1, -1), (0, 0, 0, 2)} and their negatives. - Michael Somos, Jun 23 2018
MATHEMATICA
a[ n_] := If[ n < 1, Boole[n == 0], 2 DivisorSum[n, # {1, 1, 2, 0, 1, 2, 1, 0, 2, 1, 1, 0}[[Mod[#, 12, 1]]] &]];
a[ n_] := If[ n < 1, Boole[n == 0], 2 Times @@ (Which[# < 3, 2 + (-1)^#, # == 3, 3^(#2 + 1) - 2, True, (#^(#2 + 1) - 1) / (# - 1)] & @@@ FactorInteger@n)];
a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, x]^4 + 3 * EllipticTheta[ 3, 0, x^3]^4) / 4, {x, 0, n}];
PROG
(PARI) {a(n) = if( n<1, n==0, 2 * sumdiv(n, d, d * [0, 1, 1, 2, 0, 1, 2, 1, 0, 2, 1, 1][d%12+1]))};
(PARI) {a(n) = if( n<1, n==0, my(A, p , e); A = factor(n); 2 * prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, 3, p==3, 3^(e+1) - 2, (p^(e+1) - 1) / (p -1))))};
(PARI) {a(n) = if( n<0, 0, my(A); A = x * O(x^n); polcoeff( (sum(k=1, sqrtint(n), 2 * x^k^2, 1 + A)^4 + 3 * sum(k=1, sqrtint(n\3), 2 * x^(3*k^2), 1 + A)^4) / 4, n))};
(Magma) A := Basis( ModularForms( Gamma0(12), 2), 60); A[1] + 2*A[2] + 6*A[3] + 14*A[4] + 6*A[5];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Feb 17 2017
STATUS
approved