OFFSET
0,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Michael Somos, Introduction to Ramanujan theta functions, 2019.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions.
FORMULA
phi(x) = 1 + 2*Sum_{m=1..oo} x^(m^2). - N. J. A. Sloane, Jan 30 2017
Expansion of phi(x) * phi(x^9) + 2 * x^2 * chi(x^3)^2 * psi(-x^9)^2 in powers of x where phi(), psi(), chi() are Ramanujan theta functions.
a(n) = 2 * b(n) with a(0) = 1 and b() is multiplicative with b(2^e) = 1, b(3^e) = 1 + (-1)^e if e>0, b(p^e) = e+1 if p == 1, 5 (mod 12), (p^e) = (1 + (-1)^e)/2 if p == 7, 11 (mod 12).
a(4*n + 3) = a(9*n + 3) = a(9*n + 6) = 0.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 5*Pi/9 = 1.745329... (= 100 * A019685). - Amiram Eldar, Dec 29 2023
EXAMPLE
G.f. = 1 + 2*x + 2*x^2 + 2*x^4 + 4*x^5 + 2*x^8 + 4*x^9 + 4*x^10 + 4*x^13 + ...
MATHEMATICA
a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, x]^2 + EllipticTheta[ 3, 0, x^9]^2) / 2, {x, 0, n}];
a[ n_] := If[ n < 1, Boole[n == 0], 2 Times @@ ( Which[ # < 3, 1, # == 3, 1 + (-1)^#2, Mod[#, 12] < 6, #2 + 1, True, (1 + (-1)^#2) / 2 ] & @@@ FactorInteger[n])];
PROG
(PARI) {a(n) = my(A, p, e); if( n<1, n==0, A = factor(n); 2 * prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, 1, p==3, 1 + (-1)^e, p%12>6, (1 + (-1)^e) / 2, e+1)))};
(Magma) A := Basis( ModularForms( Gamma1(36), 1), 87); A[1] + 2*A[2] + 2*A[3] + 2*A[5] + 4*A[6] + 2*A[9] + 4*A[10] + 4*A[11] + 4*A[14] + 2*A[17] + 4*A[18] + 4*A[19];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Jul 04 2015
STATUS
approved