Nothing in it but ones and powers of $q$. Evaluate it at one particular place and it becomes a root of a quadratic — and the quadratic is the golden ratio's.
Here is a continued fraction. It has no constants in it. Just 1s, and powers of a variable:
$$R(q) \;=\; \cfrac{q^{1/5}}{1 + \cfrac{q}{1 + \cfrac{q^2}{1 + \cfrac{q^3}{1 + \ddots}}}}$$Feed it a number smaller than 1 and it converges. Nothing about it suggests it knows anything.
Now pick a value of $q$. Not a round one — a transcendental one:
$$q = e^{-2\pi} = 0.001867442731707988814\ldots$$An infinite nest of fractions, fed a transcendental input. You should get a number with no structure at all. Here is what you get:
$$R(e^{-2\pi}) = 0.2840790438404122960282918323931261690910\ldots$$Which looks like nothing. So let us ask it a question.
Take that number, square it, and try this combination:
$$R^2 + (1+\sqrt 5)\,R - 1$$At 120-digit precision, that expression evaluates to
$$-8 \times 10^{-120}$$which is zero to every digit the instrument has. $R(e^{-2\pi})$ is a root of a quadratic.
And if it is a root of a quadratic, you can solve for it the way you solved for roots at school:
$$R = \frac{-(1+\sqrt 5) + \sqrt{(1+\sqrt5)^2 + 4}}{2}$$That recovers all 120 digits. An infinite continued fraction, reproduced exactly by the quadratic formula.
Divide that quadratic through by $R$ and rearrange. What it says is:
$$\frac{1}{R} - R \;=\; 1 + \sqrt 5 \;=\; 2\varphi$$Check it numerically — both sides come out $3.2360679774997896964091736687\ldots$, agreeing to 118 places.
No approximation. No fitting. $\varphi$ is not a number that happens to be nearby — it is the number this object was always going to produce.
↳ verified to 118 places ·Fair question. $e^{-2\pi}$ is one point among infinitely many. Try four others and compute $1/R - 1 - R$, which should be $\sqrt 5 = 2.2360679\ldots$ if the pattern is real:
| $q$ | $1/R - 1 - R$ | |
|---|---|---|
| $e^{-\pi}$ | 0.4438792507555781… | |
| $e^{-2\pi}$ | 2.2360679774997896… | $= \sqrt5$ |
| $e^{-3\pi}$ | 5.4347699048208446… | |
| $e^{-4\pi}$ | 11.264324681743790… | |
| $e^{-2\pi\sqrt5}$ | 15.548491078846857… |
One point out of five. It is not generic. Something is true at $e^{-2\pi}$ that is false a millimetre away.
You may have wondered about the $q^{1/5}$ on top. It looks arbitrary. It is the whole explanation.
There are two famous series, discovered by Rogers in 1894 and by Ramanujan independently:
$$G(q) = \sum_{n\ge 0}\frac{q^{n^2}}{(q;q)_n} = \prod_{n\ge 0}\frac{1}{(1-q^{5n+1})(1-q^{5n+4})}$$ $$H(q) = \sum_{n\ge 0}\frac{q^{n^2+n}}{(q;q)_n} = \prod_{n\ge 0}\frac{1}{(1-q^{5n+2})(1-q^{5n+3})}$$A sum over partitions on the left; a product over residue classes mod 5 on the right. Both verified here, sum against product, to over 100 places.
And the continued fraction is not a separate object at all:
$$R(q) = q^{1/5}\,\frac{H(q)}{G(q)}$$Also checked, to 118 places. So the $1/5$ in the exponent is the 5 in $5n+1$, $5n+4$, $5n+2$, $5n+3$. The four residue classes mod 5 that are not $0$, split into two pairs.
The residue classes are mod 5. So $R$ carries $q^{1/5}$. So the field that shows up is $\mathbb{Q}(\sqrt5)$. And $\varphi = \tfrac{1+\sqrt5}{2}$ generates the ring of integers of that field.
The golden ratio is not a guest. It is what $\mathbb{Q}(\sqrt5)$ looks like when you write it down.
↳ one 5, four appearances ·On 16 January 1913 an unknown clerk in Madras posted a list of results to a Cambridge professor. Among them was the value of this fraction at $e^{-2\pi}$, written as
$$R(e^{-2\pi}) = \sqrt{\frac{5+\sqrt5}{2}} - \frac{1+\sqrt5}{2}$$and a second one, at $e^{-2\pi\sqrt5}$, carrying a $5^{3/4}$ and a fifth root. Both verified here, to 119 and 118 places.
Hardy's account of reading them is the most quoted sentence in his correspondence, and it is worth having exactly:
They “defeated me completely; I had never seen anything in the least like them before.” And: they “must be true, because, if they were not true, no one would have the imagination to invent them.”
Note what the argument is. Not that he had checked them. That the space of false statements of that shape is empty — nobody could have made them up. It is an argument from the density of the search space, offered a century before anyone in this corpus wrote one down.
Chapter R, §VI, follows a different object to a very similar place. There, the elliptic modulus evaluated at $e^{-\pi\sqrt{58}}$ turns algebraic, the algebra is the unit group of $\mathbb{Q}(\sqrt{29})$, and a Pell equation makes the answer a whole number — which is where the 9801 in Ramanujan's series for $1/\pi$ comes from.
Here: a $q$-series evaluated at $e^{-2\pi}$ turns algebraic, the algebra is $\mathbb{Q}(\sqrt5)$, and the golden ratio falls out.
One machine, two discriminants. It has a name — complex multiplication — and it is the reason both chapters exist. Volume XI owes the theorem; its Lean floor compiles as of yesterday with one declared gap.
Worth noticing where this lands. $\varphi$ is the second rung of this series' recurrence ladder, $\pi \to \varphi \to \mu \to \eta \to \ldots$, and it usually arrives through Fibonacci. Here it arrives through a continued fraction evaluated at a point built out of $\pi$, by a route with no counting in it at all.
Verified in book7/ch-rogers-ramanujan-verify.py — ten blocks, standard library only, 120-digit decimal, $\pi$ by Machin before anything is tested against it. Exits non-zero rather than rounding to agreement. Four gaps printed on every run.