TITLE: How does $\cos(2\pi/257)$ look like in real radicals?
QUESTION [15 upvotes]: We know $\cos(2\pi/p)$ for p a Fermat prime can be expressed in real radicals. The case $p=17$ is a root of an 8th deg eqn, but can be also given as a sequence of nested radicals,
$$\begin{aligned}
4\cos(2\pi/17)&=\frac{1}{x}+\sqrt{x}\,(17+4\sqrt{17})^{1/4}=3.72988\dots\\
x &=\frac{1}{2}\Big(y+\sqrt{y^2+4}\Big)\\
y &=\frac{1}{2}(1-\sqrt{17})  
\end{aligned}$$
Question: For curiosity's sake, is there a way to explicitly write down $\cos(2\pi/257)$ as a tower of nested real radicals such that it can fit in an MSE post?
P.S. John Conway described a procedure for $p = 65537$ in this old Mathforum post, so maybe it can be adapted to the "easier" $p = 257$.
Edit (a day later): I managed to answer my own question. See below.

REPLY [2 votes]: Refer here for solving cyclic infinite nested square roots of 2
Steps to get cyclic infinite nested square roots of 2
$x =\sqrt{2-\sqrt{2+\sqrt{2+\sqrt{2+x}}}}$,  where $x = 2\cos(\frac{8}{17}\cdot\pi)$
$\sqrt{2+2\cos(\frac{8}{17}\cdot\pi)} = 2\cos(\frac{4}{17}\cdot\pi)$
Next step is to substitute
$x =\sqrt{2-\sqrt{2+\sqrt{2+\sqrt{2+x}}}} = \sqrt{2-\sqrt{2+\sqrt{2+2\cos(\frac{4}{17}\cdot\pi)}}}$
$=\sqrt{2-\sqrt{2+2\cos(\frac{2}{17}\cdot\pi)}}$
$=\sqrt{2-\cos(\frac{1}{17}\cdot\pi)}$
$=2\sin(\frac{1}{34}\cdot\pi)$
$=2\cos(\frac{8}{17}\cdot\pi)$
Therefore
$2\cos(\frac{8}{17}\cdot\pi)$ can be expanded was infinite cyclic nested square roots of 2 as follows
$$\sqrt{2-\sqrt{2+\sqrt{2+\sqrt{2+...}}}}$$ repetition of (- + + +) i.e 1-3+ signs are repeated infinitely in the nested square roots of 2 in a cyclic manner
With available programming language like python it is easy to calculate the value of $2\cos\frac{8\pi}{17}$ for desired number of digits
Same principle may be applied to evaluate $$2\cos\frac{128π}{257}$$ similar steps will lead to
$$\sqrt{2-\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+...}}}}}}}}$$
The pattern of repetition is (- + + + + + + +) i.e. 1 - & 7 + signs repeated infinitely in cyclical pattern
Therefore $(\cos\frac{2π}{257})$ can be evaluated with Half angle cosine formula which will be expressed (+ + + + + +) (128 = 2^7 to 2^1 will lead to 6 + signs initially and then it will continue as infinite cyclic nested square roots of 2 containing 1 - & 7 + signs
$(\cos\frac{2π}{257})$ will look like this as follows expressed in real radicals
$$\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2-\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+...}}}}}}}}}}}}}}}$$