OFFSET
1,4
COMMENTS
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
Euler transform of period 13 sequence [-1, 1, -1 ,-1, 1, 1 ,1, 1, -1, -1, 1, -1, 0, ...].
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = u^2 - v + u*v^3 + u^3*v^2 + 2*u*v * (1 - u + v + u*v).
G.f. A(x) satisfies 0 = f(A(x), A(x^3)) where f(u, v) = u^3*v * (3 + 3*v + v^2) + 3*u^2*v * (v^2 + v - 1) + u*v * (1 - 3*v + 3*v^2) - (u^4 + v^4)
G.f.: x * Product_{k>0} (1 - x^k)^Kronecker(13, k).
Convolution inverse is A214157.
EXAMPLE
G.f. = q - q^2 + q^3 - 2*q^4 + q^5 + q^7 + q^8 - q^9 - 2*q^10 + 2*q^13 + 2*q^14 + ...
MATHEMATICA
a[ n_] := SeriesCoefficient[ q Product[ (1 - q^k)^KroneckerSymbol[ 13, k], {k, n - 1}], {q, 0, n}]; (* Michael Somos, Jan 17 2015 *)
PROG
(PARI) {a(n) = if( n<1, 0, n--; polcoeff( prod( k=1, n, (1 - x^k)^kronecker( 13, k), 1 + x * O(x^n)), n))}; /* Michael Somos, Oct 24 2005 */
(PARI) {a(n) = my(A, u, v); if( n<0, 0, A = x; for( k=2, n, u = A + x * O(x^k); v = subst(u, x, x^2); A -= x^k * polcoeff( u^2 - v + u*v^3 + u^3*v^2 + 2*u*v * (1 - u + v + u*v), k+1) / 2); polcoeff(A, n))};
CROSSREFS
KEYWORD
sign
AUTHOR
Michael Somos, Mar 09 2004
STATUS
approved