Here is a famous problem posed by Ramanujan
Show that $$\left(1 + \frac{1}{1\cdot 3} + \frac{1}{1\cdot 3\cdot 5} + \cdots\right) + \left(\cfrac{1}{1+}\cfrac{1}{1+}\cfrac{2}{1+}\cfrac{3}{1+}\cfrac{4}{1+\cdots}\right) = \sqrt{\frac{\pi e}{2}}$$
The first series seems vaguely familiar if we consider the function $$f(x) = x + \frac{x^{3}}{1\cdot 3} + \frac{x^{5}}{1\cdot 3\cdot 5} + \cdots$$ and note that $$f'(x) = 1 + xf(x)$$ so that $y = f(x)$ satisfies the differential equation $$\frac{dy}{dx} - xy = 1, y(0) = 0$$ The integrating factor here comes to be $e^{-x^{2}/2}$ so that $$ye^{-x^{2}/2} = \int_{0}^{x}e^{-t^{2}/2}\,dt$$ and hence $$f(x) = e^{x^{2}/2}\int_{0}^{x}e^{-t^{2}/2}\,dt$$ Thus the sum of the first series is $$f(1) = \sqrt{e}\int_{0}^{1}e^{-t^{2}/2}\,dt$$ But I have no idea about the continued fraction and still more I am not able to figure out how it would simplify to $\sqrt{\pi e/2}$ at the end.
Please provide any hints or suggestions.
Update: We have $$\begin{aligned}f(1) &= \sqrt{e}\int_{0}^{1}e^{-t^{2}/2}\,dt = \sqrt{e}\int_{0}^{\infty}e^{-t^{2}/2}\,dt - \sqrt{e}\int_{1}^{\infty}e^{-t^{2}/2}\,dt\\ &= \sqrt{\frac{\pi e}{2}} - \sqrt{e}\int_{1}^{\infty}e^{-t^{2}/2}\,dt\end{aligned}$$ and hence we finally need to establish $$\sqrt{e}\int_{1}^{\infty}e^{-t^{2}/2}\,dt = \cfrac{1}{1+}\cfrac{1}{1+}\cfrac{2}{1+}\cfrac{3}{1+}\cfrac{4}{1+\cdots}$$ On further searching in Ramanujan's Collected Papers I found the following formula $$\int_{0}^{a}e^{-x^{2}}\,dx = \frac{\sqrt{\pi}}{2} - \cfrac{e^{-a^{2}}}{2a+}\cfrac{1}{a+}\cfrac{2}{2a+}\cfrac{3}{a+}\cfrac{4}{2a+\cdots}$$ and it seems helpful here. But unfortunately proving this formula seems to be another big challenge for me.
This is a sketch of the proof, the details can be found here. I will offer this sketch because that paper was not intended to prove this result in particular, and I think that a proof might have been written somewhere else.
Consider Mills ratio defined by: $$\varphi(x)=e^{x^2/2}\int_x^\infty e^{-t^2/2}dt.$$
The proof in straightforward by induction.
Indeed this follows from Leibniz $n$th derivative formula applied to $\varphi'(x)=x\varphi(x)-1$, and the uniqueness statement in Proposition 1.
This also an easy induction.
This is a crucial step. Note that $$\varphi(x)=\int_0^\infty e^{-tx}e^{-t^2/2}dt$$ therefore $$\varphi^{(n)}(x)=(-1)^n\int_0^\infty t^ne^{-tx}e^{-t^2/2}dt$$
This last result, and the recurrence relations from Proposition 2. proves that $(Q_n/P_n)$ are the convergents of the non regular continued fraction: $$ \frac{Q_{n+1}}{P_{n+1}}=\cfrac{1}{x+\cfrac{1}{x+\cfrac{2}{x+\cfrac{3}{x+\cfrac{4}{x+\cfrac{\ddots}{n/x}}}}}} $$
Finally the desired equality follows from the fact that $\varphi(1)+f(1)=\sqrt{\frac{e\pi}{2}}$, where $f$ is the function considered by the OP. This concludes the sketch of the proof.$\qquad\square$