Continued fraction of $e^{-2\pi n}$

I found this problem on a well-known problem solving website. It is apparently from Ramanujan.

With $$\LARGE{a = \frac{1}{1 + \frac{e^{-2\pi}}{1 + \frac{e^{-4\pi}}{1 + \ddots}}}},$$ what is $a$?

The basic methods I know for questions of this type were not helpful to me.

I do not require a full solution, but feel free to post one if you would like. Hints or lecture notes on how to solve problems of this nature would be appreciated.

Keep in mind that I am at an undergraduate level in mathematics.


Solution 1:

This is one of the formulas that Ramanujan sent Hardy in a letter. It is one of three that Hardy says "defeated me completely; I had never seen anything in the least like them before. A single look at them is enough to show that they could only be written down by a mathematician of the highest class. They must be true because, if they were not true, no one would have had the imagination to invent them."

Needless to say, this is far beyond the undergraduate level.