From this previous post, given $t = 2\pi/p$ for the appropriate prime $p=4m+1$, we find closed-forms only for $x,y$,
$$\begin{align} x &= \sum_{k=1}^m \sin^2(a_k\, t) = \frac{p+\sqrt{p}}8 \quad\quad\\ y &= \sum_{k=1}^m \cos^2(a_k\, t) = \frac{(p-2)-\sqrt{p}}8 \quad\quad\\ z &= \sum_{k=1}^m \tan^2(a_k\, t) = \; ??\quad\quad \end{align}$$
using the same finite sequence of integer $a_k.$
To find the closed-form of the tangent version is a bit trickier, though I know $z$ is also a root of a quadratic. But the tangent product using the same $a_k$ for certain $p=4m+1$ was slightly easier,
$$\begin{align} \quad\quad\left(\frac{1+\sqrt{5}}2\right)^{3/2} &=\frac{\tan(t)}{\sqrt[4]{5}}\\ \quad\quad\left(\frac{3+\sqrt{13}}2\right)^{3/2} &=\frac{\tan(t)\tan(3t)\tan(4t)}{\sqrt[4]{13}}\\ \quad\quad\left(\frac{5+\sqrt{29}}2\right)^{3/2} &=\frac{\tan(t)\tan(4t)\tan(5t)\tan(6t)\tan(7t)\tan(9t)\tan(13t)}{\sqrt[4]{29}}\\ \end{align}$$
and so on for other primes.
Question: Given prime $\color{blue}{p=n^2+4}=4m+1,$ with $t = 2\pi/p.$ From the previous post, define the finite set of integer $a_k$ that satisfies,
$$x = \sum_{k=1}^m \sin^2(a_k\, t) = \frac{p+\sqrt{p}}8\quad\quad$$
Using the very same $a_k$, is it true that,
$$\quad w = \frac1{\sqrt[4]{p}}\,\prod_{k=1}^m \tan(a_k\, t) = \left(\frac{\color{blue}n+\sqrt{p}}2\right)^{3/2} = \big(U_p\big)^{3/2}$$
where $U_p$ is a fundamental unit?