TITLE: How did Ramanujan find this formula?
QUESTION [13 upvotes]: I have seen this formula from Ramanujan 
$$\sum_n \frac{a^{n+1}-b^{n+1}}{a-b}\frac{c^{n+1}-d^{n+1}}{c-d}T^n = \\\frac{1-abcdT^2}{(1-acT)(1-adT)(1-bcT)(1-bdT)} \tag{1}$$
I know how to prove it via geometric series but I don't find this proof very intuitive:
$$ \frac{1}{(a-b)(c-d)}\left(\frac{ac}{1-acT} - \frac{ad}{1-adT} - \frac{bc}{1-bcT} + \frac{bd}{1-bdT} \right) = \\
\frac{1-abcdT^2}{(1-acT)(1-adT)(1-bcT)(1-bdT)} \tag{2}$$
Does anyone have an idea how Ramanujan got this formula? Or, more generally, does anyone have an idea how to prove it intuitively?

REPLY [11 votes]: The question about "how Ramanujan get this formula" is, in general, very mysterious. Nobody knows how he came up with his thousands of formulas.
He was a genius of the highest order and we can only speculate how he was able to do what he did. He was familiar with many special examples and formulas and was able to do elaborate symbolic and numerical calculations combined with extraordinary intuition. Hardy worked closely with Ramanujan in his last years and wrote Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work and gives his opinions on Ramanujan's methods.
From the theory of Fibonacci/Lucas sequences the ordinary generating function of such a sequence is the reciprocal of a quadratic. For example:
$$ \sum_{n=0}^\infty F_{n+1} T^n = 1/(1-T-T^2).$$ Ramanujan may have asked "What is the o.g.f. of a product of two such sequences?". The left side of equation $(1)$ is the o.g.f. and the right side is the rational function answer to that question. Expanding the coefficient of $\,T^n\,$ on the left side and splitting the infinite sum into four infinite sums of geometric series we get the left side of equation $(2)$. The happy
surprising result is how simple the numerator of the right side is.
Just to be clear, the key step is to expand the product
$$ (a^{n+1}\!-\!b^{n+1}) (c^{n+1}\!-\!d^{n+1}) \!=\!
  (ac)^{n+1} \!-\! (ad)^{n+1} \!-\! (bc)^{n+1} \!+\! (bd)^{n+1}. $$
EDIT: The Wikipedia article generating function transformation section
on Hadamard product of rational generating functions has an
example which is essentially the Ramanujan formula -- just not
expressed in terms of the roots of the quadratics, but rather
the coefficients of the quadratics.