Let $x = \cos(\pi/8) = \frac{1}{2} \sqrt{2+\sqrt{2}}$ and $y = \sin(\pi/8) = \frac{1}{2} \sqrt{2-\sqrt{2}}$. What is the lowest degree polynomial $p(x,y)$ with integer coefficients such that $p(x,y) = \frac{1}{\sqrt{2^n}}$?
(By degree I mean the joint degree in $x$ and $y$. For example, I am considering $p(x,y) = x^2 y$ to be degree 3.)
One can obtain $\frac{1}{\sqrt{2^n}}$ using a degree $2n$ polynomial, namely $p(x,y) = (x^2-y^2)^n$. I suspect this is optimal. I also have the feeling that this problem might be easily solved using some standard technique related to number fields but I don't know how to do it.