On the formula, $\pi = \frac 5\varphi\cdot\frac 2{\sqrt{2+\sqrt{2+\varphi}}}\cdot\frac 2{\sqrt{2+\sqrt{2+\sqrt{2+\varphi}}}}\cdots$

I found a formula on google images when I was looking at some formulas for $\pi$ just for the fun of it, and I came across one that really startled me, and was quite reminiscent of Viète's product.

Let $\varphi = \cfrac{1+\sqrt 5}2$ then $$\pi = \cfrac 5\varphi\cdot\cfrac 2{\sqrt{2+\sqrt{2+\varphi}}}\cdot\cfrac 2{\sqrt{2+\sqrt{2+\sqrt{2+\varphi}}}}\cdot\cfrac 2{\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\varphi}}}}}\cdots$$

The source is from a Twitter post from someone who claimed that Ramanujan showed them this formula in a dream. Now, I don't quite know what to say to that, so I'll leave that to you.

What I'm looking for is a way to prove this. It is not often that I see a formula describing a relationship between $\pi$ and $\varphi$ but I am aware that the nested radicals seem to mimic ones like shown here (which, as a matter of fact, shows that some radical formulae of my own have been rediscovered... but that's another story). Plugging several iterations in Wolfram Alpha, it does appear convincing.

Those nested radicals represent trigonometric functions, and $\pi$ is certainly involved there.

Any thoughts?

Thanks.


Edit:

Actually, according to the third link, I've made a conjecture which, if true, could surely help in proving this:

$$2\cos \cfrac{\pi}{20}=\sqrt{2+\sqrt{2+\varphi}}$$ $$2\cos \cfrac{\pi}{40}=\sqrt{2+\sqrt{2+\sqrt{2+\varphi}}}$$ $$2\cos \cfrac{\pi}{80}=\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\varphi}}}}$$ $$\vdots$$

If the conjectured pattern is true indefinitely, then the formula can be restated as $$\pi = \cfrac{5}{\varphi}\prod_{n=1}^\infty \cfrac{1}{\cos \frac{\pi}{20 \cdot 2^{n-1}}}$$


Edit 2:

This formula above involving $\pi$ and $\varphi$ actually contains a very hidden surprise! If you isolate $\pi\varphi\div 5$, this is equal to the square of a very elegant integral. Namely, $$\cfrac{\pi\varphi}{5} = \cfrac 2{\sqrt{2+\sqrt{2+\varphi}}}\cdot\cfrac 2{\sqrt{2+\sqrt{2+\sqrt{2+\varphi}}}}\cdots$$ $$=\Bigg\{\int_{-\infty}^\infty e^{-x^2}\cos\big(2x^2\big)\,\mathrm dx\Bigg\}^2$$ This, indubitably, is something which Ramanujan would highly commend :)


Start with Euler's identity

$$ \frac{\sin x}{x} = \prod_{k=1}^{\infty} \cos \left(\frac{x}{2^k} \right) $$

which is readily derived from the sine angle duplication formula. Setting $ x = \pi/10 $ gives

$$ \frac{\varphi - 1}{\pi/5} = \prod_{k=1}^{\infty} \cos \left(\frac{\pi}{20 \cdot 2^{k-1}} \right) $$

$$ \frac{1}{\pi} = \frac{1}{5(\varphi - 1)} \prod_{k=1}^{\infty} \cos \left(\frac{\pi}{20 \cdot 2^{k-1}} \right) = \frac{\varphi}{5} \prod_{k=1}^{\infty} \cos \left(\frac{\pi}{20 \cdot 2^{k-1}} \right) $$

after noting that $ \varphi (\varphi - 1) = 1 $, which finishes the proof given your observation. To prove that one, just remember the cosine angle duplication identity,

$$ 2 \cos(x/2) = \sqrt{2 \cos(x) + 2} $$