Ramanujan mentioned the following continued fraction formula in his famous letter to G. H. Hardy in 1913:
$$\cfrac{4}{x +}\cfrac{1^{2}}{2x +}\cfrac{3^{2}}{2x +}\cdots = \left(\dfrac{\Gamma\left(\dfrac{x + 1}{4}\right)}{\Gamma\left(\dfrac{x + 3}{4}\right)}\right)^{2}\tag{1}$$ The form of the continued fraction is very familiar and I am aware of the standard result corresponding to $x = 1$ namely $$\pi = \cfrac{4}{1 +}\cfrac{1^{2}}{2 +}\cfrac{3^{2}}{2 +}\cdots\tag{2}$$ How do we generalize $(2)$ to get $(1)$?
Just for clarity the notation $$\cfrac{a_{1}}{b_{1}+}\cfrac{a_{2}}{b_{2}+}\cfrac{a_{3}}{b_{3}+}\cdots$$ consumes less space in typing compared to the more cumbersome but easier to understand continued fraction $$\cfrac{a_{1}}{b_{1} + \cfrac{a_{2}}{b_{2} + \cfrac{a_{3}}{b_{3} + \cdots}}}$$