OFFSET
0,2
COMMENTS
A continued fraction identity from page 46 of Ramanujan's lost notebook gives:
if k = a*b, a = (sqrt(1 + 4*k) + 1)/2, and b = (sqrt(1 + 4*k) - 1)/2, then
1/(1 + (k + q)/(1 + (k + q^2)/(1 + (k + q^3)/(1 + ...)))) = 1/(a + q/(a+b*q + q^2/(a+b*q^2 + q^3/(a+b*q^3 + ...)))).
Here we set k = x+x^2 and q = x, with a = 1+x and b = x.
LINKS
Paul D. Hanna, Table of n, a(n) for n = 0..1275
FORMULA
G.f.: 1/(1 + (x+x^2 + x)/(1 + (x+x^2 + x^2)/(1 + (x+x^2 + x^3)/(1 + (x+x^2 + x^4)/(1 + (x+x^2 + x^5)/(1 + ...)))))), a continued fraction.
G.f.: 1/(1+x + x/(1+x + x^2 + x^2/(1+x + x^3 + x^3/(1+x + x^4 + x^4/(1+x + x^5 + x^5/(1+x + x^6 + ...)))))), a continued fraction.
EXAMPLE
G.f.: A(x) = 1 - 2*x + 5*x^2 - 11*x^3 + 21*x^4 - 36*x^5 + 55*x^6 - 68*x^7 + 40*x^8 + 123*x^9 - 642*x^10 + 1988*x^11 - 5080*x^12 + ...
PROG
(PARI) {a(n) = my(R=1); for(k=0, n-1,
R = 1/(1 + (x+x^2 + x^(n-k))*R +x*O(x^n))); polcoeff(R, n)}
for(n=0, 32, print1(a(n), ", "))
(PARI) {a(n) = my(R=1 +x^2*O(x^n));
for(k=0, n-2, R = 1/(1+x + x^(n-k) + x^(n-k)*R +x^2*O(x^n))); R = 1/(1+x + x*R); polcoeff(R, n)}
for(n=0, 32, print1(a(n), ", "))
CROSSREFS
KEYWORD
sign
AUTHOR
Paul D. Hanna, Mar 08 2022
STATUS
approved