For an arbitrary $n$, evaluate $\left(z^n+\frac{1}{z^{n}}\right)\left(z^n +\frac{1}{z^n}+1\right)$ Let me put you in context, I have the following problem:

Let $z$ be a complex number such that $$\left(z+\frac{1}{z}\right)\left(z+\frac{1}{z}+1\right)=1.$$
For an arbitrary $n$, evaluate
$$\left(z^n +\frac{1}{z^n}\right)\left(z^n+\frac{1}{z^n}+1\right)$$

I've been trying to get the answer, however I am not sure if my proof is completely rigorous. My solution:
Given the hypothesis, we have:
\begin{align*}
        \left(z+\frac{1}{z}\right)\left(z+\frac{1}{z}+1\right) & = 1\\
        z^2+1+z+1+\frac{1}{z^2} + \frac{1}{z} &= 1 \\
        z^2+1+z+\frac{1}{z^2} + \frac{1}{z} &= 0 \\
        \frac{z^4+z^2+z^3+1+z}{z^2}&= 0\\
        \frac{(z^4+z^2+z^3+1+z)(z-1)}{z^2(z-1)}&= 0\\
        \frac{(z^5-1)}{z^2(z-1)}&= 0,z\neq 1
    \end{align*}
Also, we have the expression to evaluate:
$$\left(z^{n}+\frac{1}{z^{n}}\right)\left(z^{n}+\frac{1}{z^{n}}+1\right)$$
If $n=0$:
$$\left(z^{0}+\frac{1}{z^{0}}\right)\left(z^{0}+\frac{1}{z^{0}}+1\right)= (1+1)(1+1+1) =6$$
If $n\neq 0$:
\begin{align*}
            \left(z^{n}+\frac{1}{z^{n}}\right)\left(z^{n}+\frac{1}{z^{n}}+1\right) & = 1\\
            z^{2n}+1+z^n+1+\frac{1}{z^{2n}} + \frac{1}{z^n} &= 1 \\
            z^{2n}+1+z^n+\frac{1}{z^{2n}} + \frac{1}{z^n} &= 0 \\
            \frac{z^{4n}+z^{2n}+z^{3n}+1+z^n}{z^{2n}}&= 0\\
            \frac{(z^{4n}+z^{2n}+z^{3n}+1+z^n)(z^{n}-1)}{z^{2n}(z^{n}-1)}&= 0\\
            \frac{(z^{5n}-1)}{z^{2n}(z^{n}-1)}&= 0, z^n\neq 0
        \end{align*}
Therefore,
$$\left(z^{n}+\frac{1}{z^{n}}\right)\left(z^{n}+\frac{1}{z^{n}}+1\right)=\begin{cases}
        6, & n=0\\
        1, & n\neq 0
    \end{cases}$$
What do you think?

Your answer has something wrong, especially the case where $n$ is divided by $5$. Let me explain why.
From $\left(z+\frac{1}{z}\right)\left(z+\frac{1}{z}+1\right)=1$ we have $z^5=1$ and $z\neq 1$. So $z$ is a root of unity $5$, so $z=\zeta^m$, where $\zeta=e^{\frac{2\pi i}5}$ and $m\in\{1,2,3,4\}$. Now it is easy to check that $z^n=1$ if and only if $n$ is divided by $5$, or equivalently, $n=5k$ for some $k\in \mathbb Z$ (the essence is that $5$ is a prime number.)
Now,
$$\left(z^{n}+\frac{1}{z^{n}}\right)\left(z^{n}+\frac{1}{z^{n}}+1\right)=\frac{z^{4n}+z^{3n}+z^{2n}+z^n+1}{z^{2n}}+1.$$
If $z^n\neq 1$, i.e. $5\not\mid n$, then we can apply the summation formula for geometric progression:
$$\frac{z^{4n}+z^{3n}+z^{2n}+z^n+1}{z^{2n}}+1=\frac{(z^{5n}-1)}{z^{2n}(z^{n}-1)}+1=0+1=1,$$
where we use $z^5=1\Longrightarrow z^{5n}=1$. If $z^n=1$, i.e., $5\mid n$, then
$$\frac{z^{4n}+z^{3n}+z^{2n}+z^n+1}{z^{2n}}+1=\frac{1+1+1+1+1}1+1=6.$$
Therefore, the answer is
$$\left(z^{n}+\frac{1}{z^{n}}\right)\left(z^{n}+\frac{1}{z^{n}}+1\right)=\begin{cases}
            6, & 5\mid n,\\
            1, & \text{otherwise}.
        \end{cases}$$
