How many classes are there modulo 343 such that $a^{70} \equiv 1 \pmod{343}$? Same question modulo 128.
First, $343=7^{3}$, so the group $(\mathbb{Z} / 343 \mathbb{Z})^{*}$ is cyclic and isomorphic to $\mathbb{Z} / 294 \mathbb{Z}\left(294=6 \cdot 7^{2}\right)$. Let $x$ be a primitive root and $\alpha$ such that $a=x^{\alpha}$:

$$
\mathrm{a}^{70} \equiv 1[343] \Longleftrightarrow 70 \alpha \equiv 0[294] \Longleftrightarrow 21 \mid \alpha
$$

This gives us 14 equivalence classes mod 294 for $\alpha$, which correspond to 14 equivalence classes modulo 343 for $a$.

Now, for the modulo 128, it is slightly different since

$$
\left((\mathbb{Z} / 128 \mathbb{Z})^{*}, x\right) \simeq(\mathbb{Z} / 2 \mathbb{Z} \times \mathbb{Z} /(32) \mathbb{Z},+)
$$

We are looking for all pairs $(\varepsilon, k)$ with $\varepsilon \in \mathbb{Z} / 2 \mathbb{Z}$ and $k \in \mathbb{Z} / 32 \mathbb{Z}$ that satisfy $70 \varepsilon \equiv 0[2]$ and $70 k \equiv 0[32]$. We quickly see that there are two choices for $\varepsilon$ and two choices for $k$, which corresponds to 4 equivalence classes mod 128.