Reason for substitution : $a=z + \frac{1}{z}$. Have read regarding the substitution $a = z + \frac{1}{z}$ to get the factorization of $z^6+z^5+z^4+z^3 +z^2+z+1$ to get the form $a^3+a^2-2a -1=0$ in the book by Erickson martin, titled: Beautiful mathematics, on page #$58$ as shown below.
I am unable to get the process for the division, i.e. how to divide by $a$ the given polynomial. I mean that $a = \frac{z^2+1}{z}$ cannot divide $z^6+z^5+z^4+z^3 +z^2+z+1$.
For $z^5-1=0\implies (z-1)(z^4+z^3+z^2+z+1)=0$, want to use the same logic of symmetry for $z+z^4= z+\frac1z=a'$, but am hindered by the inability to divide $(z^4+z^3+z^2+z+1)$ by $a'$.


$a=z+\dfrac{1}{z}\Rightarrow a^2=\left(z+\dfrac{1}{z}\right)^2=z^2+\dfrac{1}{z^2}+2$
$a=z+\dfrac{1}{z}\Rightarrow a^3=\left(z+\dfrac{1}{z}\right)^3=z^3+3\dfrac{z^2}{z}+3\dfrac{z}{z^2}+\dfrac{1}{z^3}=z^3+\dfrac{1}{z^3}+3z+\dfrac{3}{z}$
$a=z+\dfrac{1}{z}\Rightarrow -2a=-2z-\dfrac{2}{z}$
Then we will have
$a^3+a^2-2a-1=0$
$\Leftrightarrow z^3+\dfrac{1}{z^3}+3z+\dfrac{3}{z}+z^2+\dfrac{1}{z^2}+2-2z-\dfrac{2}{z}-1=0$
$\Leftrightarrow z^3+x^2+z+1+\dfrac{1}{z}+\dfrac{1}{z^2}+\dfrac{1}{z^3}=0$
$\Leftrightarrow z^3\left(z^3+x^2+z+1+\dfrac{1}{z}+\dfrac{1}{z^2}+\dfrac{1}{z^3}\right)=0$
$\Leftrightarrow z^6+z^5+z^4+z^3+z^2+z+1=0$
If this problem appears as an exercise, it should be done like this (reverse the steps above):

$z^6+z^5+z^4+z^3+z^2+z+1=0$, we know that $z=0$ is not a root of this equation
$\Leftrightarrow \dfrac{z^6+z^5+z^4+z^3+z^2+z+1}{z^3}=0$
$\Leftrightarrow z^3+z^2+z+1+\dfrac{1}{z}+\dfrac{1}{z^2}+\dfrac{1}{z^3}=0$
$\Leftrightarrow z^3+\dfrac{1}{z^3}+3z+\dfrac{3}{z}+z^2+\dfrac{1}{z^2}+2-2z-\dfrac{2}{z}-1=0$
Let $a=z+\dfrac{1}{z}$, we have:
$a=z+\dfrac{1}{z}\Rightarrow a^2=\left(z+\dfrac{1}{z}\right)^2=z^2+\dfrac{1}{z^2}+2$
$a=z+\dfrac{1}{z}\Rightarrow a^3=\left(z+\dfrac{1}{z}\right)^3=z^3+3\dfrac{z^2}{z}+3\dfrac{z}{z^2}+\dfrac{1}{z^3}=z^3+\dfrac{1}{z^3}+3z+\dfrac{3}{z}$
$a=z+\dfrac{1}{z}\Rightarrow -2a=-2z-\dfrac{2}{z}$
then $a^3+a^2-2a-1=0$.

