Finding elements of order $8$ in $\mathbb{Z}_{8000000}$.

Since $Z_{8000000}$ is cyclic, it contains exactly $\phi(8)=4$ elements of order $8$. We see that $1000000\in Z_{8000000}$ is one of these elements. It is also the generator of the unique subgroup of $Z_{8000000}$ of order $8$. The other three elements of order $8$ are $7000000$, $5000000$, and $3000000$. In general, the generators of this unique subgroup are the elements $n\cdot 1000000$, where $\gcd(n,8)=1$.

NOTE: $\phi(8000000)$ would be the number of generators of $Z_{8000000}$. We calculate $\phi(8)$ because we are interested in the number of generators of the subgroup of $Z_{8000000}$ of size $8$ as opposed to the whole group, which is size $8000000$.


The order of $\bar m$ in $\mathbb{Z}_{8000000}$ is $\frac{8000000}{gcd(m,8000000)}$. This is $8$ if and only if

$$gcd(m,8000000)=1000000$$

Thus, $m$ must be an odd multiple of $1000000$.