Let $n$ be a positive integer and let $z$ be a complex number such that $z^{2^n-1}-1=0$. Evaluate
$$\prod_{k=0}^{n-1}\left(z^{2^k}+\dfrac{1}{z^{2^k}}-1\right).$$
Proposed by Titu Andreescu.
Solution:
It's clear that if $z=1$, then $\displaystyle \prod_{k=0}^{n-1}\left(z^{2^k}+\dfrac{1}{z^{2^k}}-1\right)=1$. Assume that $z \neq 1$. We have $$z^{2^n-1}-1=(z-1)(z^{2^n-2}+z^{2^n-3}+\ldots+z+1)=0,$$ so $z^{2^n-2}+z^{2^n-3}+\ldots+z+1=0$. Then,
$$\begin{array}{lll} \displaystyle \prod_{k=0}^{n-1}\left(z^{2^k}+\dfrac{1}{z^{2^k}}-1\right) & = & \displaystyle \prod_{k=0}^{n-1}\left(z^{2^{k+1}}-z^{2^k}+1\right) \\ & = & \displaystyle \prod_{k=0}^{n-1} \dfrac{z^{3\cdot2^k}+1}{z^{2^k}+1}.\end{array}$$ Clearly, $$\displaystyle \prod_{k=0}^{n-1} (z^{2^k}+1) = \sum_{k=0}^{2^n-1} z^k = z^{2^n-1} + \sum_{k=0}^{2^n-2} z^k = 1.$$ Let $n$ be odd. Since $\gcd(2^n-1,3)=1$, then $z^{3i} \neq z^{3j} \quad \forall i \not \equiv j \pmod{2^n-1}$. So, $$\displaystyle \prod_{k=0}^{n-1} (z^{3\cdot2^k}+1) = \sum_{k=0}^{2^n-1} z^{3k} = z^{3 (2^n-1)} + \sum_{k=0}^{2^n-2} z^{3k} = 1 + \sum_{k=0}^{2^n-2} z^k = 1,$$ which gives $\displaystyle \prod_{k=0}^{n-1}\left(z^{2^k}+\dfrac{1}{z^{2^k}}-1\right)=1$. Now, let $n$ be even. Then $$z^{2^n-1}-1=(z^3-1)(z^{2^n-4}+z^{2^n-7}+\ldots+z^3+1)=0.$$ If $z$ is a third root of unity, then $z^3=1$ and
$$\prod_{k=0}^{n-1} (z^{3\cdot2^k}+1) = \sum_{k=0}^{2^n-1} z^{3k} = 2^n,$$ which gives $\displaystyle \prod_{k=0}^{n-1}\left(z^{2^k}+\dfrac{1}{z^{2^k}}-1\right)=2^n$. If $z$ is not a third root of unity, since $z^{2^n-(3k+1)}=z^{3(2^n-1-k)}$, then
$$\prod_{k=0}^{n-1} (z^{3\cdot2^k}+1) = \sum_{k=0}^{2^n-1} z^{3k} = z^{3k(2^n-1)} + \sum_{k=1}^{2^n-1} z^{3(2^n-1-k)} = 1 + 3 \sum_{k=1}^{\frac{2^n-1}{3}} z^{2^n-(3k+1)} = 1.$$
In summary,
$$\prod_{k=0}^{n-1}\left(z^{2^k}+\dfrac{1}{z^{2^k}}-1\right)=\left\{ \begin{array}{lll} 2^n & \textrm{if } n \textrm{ is even and } z = e^{\frac{2i\pi}{3}},e^{\frac{4i\pi}{3}} \\ 1 & \textrm{otherwise.} \end{array} \right.$$
$$\begin{array}{lll} \displaystyle \prod_{k=0}^{n-1}\left(z^{2^k}+\dfrac{1}{z^{2^k}}-1\right) & = & \displaystyle \prod_{k=0}^{n-1}\left(z^{2^{k+1}}-z^{2^k}+1\right) \\ & = & \displaystyle \prod_{k=0}^{n-1} \dfrac{z^{3\cdot2^k}+1}{z^{2^k}+1}.\end{array}$$ Clearly, $$\displaystyle \prod_{k=0}^{n-1} (z^{2^k}+1) = \sum_{k=0}^{2^n-1} z^k = z^{2^n-1} + \sum_{k=0}^{2^n-2} z^k = 1.$$ Let $n$ be odd. Since $\gcd(2^n-1,3)=1$, then $z^{3i} \neq z^{3j} \quad \forall i \not \equiv j \pmod{2^n-1}$. So, $$\displaystyle \prod_{k=0}^{n-1} (z^{3\cdot2^k}+1) = \sum_{k=0}^{2^n-1} z^{3k} = z^{3 (2^n-1)} + \sum_{k=0}^{2^n-2} z^{3k} = 1 + \sum_{k=0}^{2^n-2} z^k = 1,$$ which gives $\displaystyle \prod_{k=0}^{n-1}\left(z^{2^k}+\dfrac{1}{z^{2^k}}-1\right)=1$. Now, let $n$ be even. Then $$z^{2^n-1}-1=(z^3-1)(z^{2^n-4}+z^{2^n-7}+\ldots+z^3+1)=0.$$ If $z$ is a third root of unity, then $z^3=1$ and
$$\prod_{k=0}^{n-1} (z^{3\cdot2^k}+1) = \sum_{k=0}^{2^n-1} z^{3k} = 2^n,$$ which gives $\displaystyle \prod_{k=0}^{n-1}\left(z^{2^k}+\dfrac{1}{z^{2^k}}-1\right)=2^n$. If $z$ is not a third root of unity, since $z^{2^n-(3k+1)}=z^{3(2^n-1-k)}$, then
$$\prod_{k=0}^{n-1} (z^{3\cdot2^k}+1) = \sum_{k=0}^{2^n-1} z^{3k} = z^{3k(2^n-1)} + \sum_{k=1}^{2^n-1} z^{3(2^n-1-k)} = 1 + 3 \sum_{k=1}^{\frac{2^n-1}{3}} z^{2^n-(3k+1)} = 1.$$
In summary,
$$\prod_{k=0}^{n-1}\left(z^{2^k}+\dfrac{1}{z^{2^k}}-1\right)=\left\{ \begin{array}{lll} 2^n & \textrm{if } n \textrm{ is even and } z = e^{\frac{2i\pi}{3}},e^{\frac{4i\pi}{3}} \\ 1 & \textrm{otherwise.} \end{array} \right.$$