OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Michael Somos, Introduction to Ramanujan theta functions
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
FORMULA
f(x,x^m) = 1 + Sum_{k>=1} x^((m+1)*k*(k-1)/2) (x^k + x^(m*k)). - N. J. A. Sloane, Jan 30 2017
Euler transform of a period 36 sequence.
G.f.: x * (Sum_{k in Z} x^k^2) * (Sum_{k in Z} x^(9*k^2 + 8*k)).
G.f.: x * Product_{k>0} (1 + x^(2*k-1))^2 * (1 - x^(2*k)) * (1 + x^(18*k-17)) * (1 + x^(18*k-1)) * (1 - x^(18*k)).
a(4*n) = a(8*n + 7) = a(16*n + 13) = a(32*n + 9) = a(49*n + 7) = a(98*n + 14) = 0.
a(n) = b(9*n + 7) where b = A002654, A035154, A113446, A122864, A125061, A129448, A138950, A163746, A256276, A258228, A258256.
EXAMPLE
G.f. = x + 3*x^2 + 2*x^3 + 2*x^5 + 2*x^6 + 2*x^10 + 2*x^11 + 2*x^17 + ...
G.f. = q^16 + 3*q^25 + 2*q^34 + 2*q^52 + 2*q^61 + 2*q^97 + 2*q^106 + ...
MATHEMATICA
a[ n_] := If[ n < 0, 0, DivisorSum[ 9 n + 7, KroneckerSymbol[ -4, #] &]];
a[ n_] := If[ n < 0, 0, Times @@ (Which[# < 3, 1, Mod[#, 4] == 1, #2 + 1, True, (1 + (-1)^#2) / 2] & @@@ FactorInteger[ 9 n + 7])];
a[ n_] := SeriesCoefficient[ x EllipticTheta[ 3, 0, x] QPochhammer[ -x, x^18] QPochhammer[ -x^17, x^18] QPochhammer[ x^18], {x, 0, n}];
PROG
(PARI) {a(n) = if( n<0, 0, sumdiv(9*n + 7, d, (d%4==1) - (d%4==3)))};
(PARI) {a(n) = if( n<0, 0, my(A, p, e); A = factor(9*n + 7); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if(p==2, 1, p%4==1, e+1, 1-e%2)))};
(PARI) {a(n) = if( n<0, 0, my(m = 9*n + 7, k, s); forstep(j=0, sqrtint(m), 3, if( issquare(m - j^2, &k) && (k%9 == 4 || k%9 == 5), s+=(j>0)+1)); s)};
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael Somos, Jan 23 2017
STATUS
approved