OFFSET
1,3
FORMULA
L.g.f.: log( 1/(1-x/(1-x^2/(1-x^3/(1-x^4/(1-x^5/(1-...)))))) ), the logarithm of a continued fraction.
L.g.f.: log( P(x) / Q(x) ) where
P(x) = Sum_{n>=0} (-1)^n* x^(n*(n+1)) / Product(k=1..n} (1-x^k),
Q(x) = Sum_{n>=0} (-1)^n* x^(n^2) / Product(k=1..n} (1-x^k),
due to the Rogers-Ramanujan continued fraction identity.
EXAMPLE
L.g.f.: L(x) = x + x^2/2 + 4*x^3/3 + 5*x^4/4 + 11*x^5/5 + 22*x^6/6 +...
such L(x) = log(P(x)) - log(Q(x)) where
P(x) = 1 - x^2 - x^3 - x^4 - x^5 + x^8 + x^9 + 2*x^10 + 2*x^11 + 2*x^12 + 2*x^13 + 2*x^14 + x^15 + x^16 - x^18 +...+ A224898(n)*x^n +...
Q(x) = 1 - x - x^2 - x^3 + x^6 + x^7 + 2*x^8 + x^9 + 2*x^10 + x^11 + x^12 - 2*x^15 - x^16 - 3*x^17 - 3*x^18 +...+ A039924(n)*x^n +...
log(P(x)) = -2*x^2/2 - 3*x^3/3 - 6*x^4/4 - 10*x^5/5 - 11*x^6/6 - 21*x^7/7 - 22*x^8/8 - 39*x^9/9 - 42*x^10/10 +...
log(Q(x)) = -x - 3*x^2/2 - 7*x^3/3 - 11*x^4/4 - 21*x^5/5 - 33*x^6/6 - 57*x^7/7 - 91*x^8/8 - 160*x^9/9 - 263*x^10/10 +...
PROG
(PARI) /* As the log of a continued fraction: */
{a(n)=local(A=x, CF=1+x); for(k=0, n, CF=1/(1-x^(n-k+1)*CF+x*O(x^n)); A=log(CF)); n*polcoeff(A, n)}
for(n=1, 40, print1(a(n), ", "))
(PARI) /* By the Rogers-Ramanujan continued fraction identity: */
{a(n)=local(A=x, P=1+x, Q=1);
P=sum(m=0, sqrtint(n), (-1)^m*x^(m*(m+1))/prod(k=1, m, 1-x^k));
Q=sum(m=0, sqrtint(n), (-1)^m*x^(m^2)/prod(k=1, m, 1-x^k));
A=log(P/(Q+x*O(x^n))); n*polcoeff(A, n)}
for(n=1, 40, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jul 17 2013
STATUS
approved