$a^{12} \equiv 1 \pmod{35}$,knowing that $(a,35)=1$ Prove that $\forall a \text{ with } (a,35)=1:$
$$a^{12} \equiv 1 \pmod{35}$$
$$35 \mid a^{12}-1 \Leftrightarrow 5 \cdot 7 \mid a^{12}-1 \overset{(5,7=1)}{ \Leftrightarrow} 5 \mid a^{12}-1 \text{ and } 7 \mid a^{12}-1$$
Therefore, $\displaystyle{ a^{12} \equiv 1 \pmod{35} \Leftrightarrow a^{12} \equiv 1 \pmod 5, a^{12} \equiv 1 \pmod 7}$
$$(a,35=1) \Rightarrow (a, 5 \cdot 7)=1 \overset{(5,7)=1}{\Rightarrow } (a,5)=1 \text{ and } (a,7)=1$$
According to Fermat's theorem:
$$a^4 \equiv 1 \pmod 5$$
$$a^{12} \equiv (a^4)^3 \equiv 1 \pmod 5$$
Also:
$$a^6 \equiv 1 \pmod 7$$
$$a^{12} \equiv (a^6)^2 \equiv 1 \pmod 7$$
So,we conclude that:
$$a^{12} \equiv 1 \pmod{35}$$
Could you tell me if it is right?
 A: Yes we can tell. This is because we have $a^{12} \equiv 1 \pmod 5 \iff 5|(a^{12}-1).$ Similarly $a^{12} \equiv 1 \pmod 7 \iff 7|(a^{12}-1)$. Since ${\rm gcd}(5,7)=1$, we have $5\cdot 7 | (a^{12}-1)$, i.e., $a^{12} \equiv 1 \pmod {35}$.
A: Hint $\ $ If $\,a\,$ is coprime to primes $\,p_1\!\ne p_2\,$ and $\,\color{#0a0}{p_i\!-1\mid n}\,$ then by  $\rm\color{#c00}{little\ Fermat}$
$\qquad\qquad\qquad {\rm mod}\ p_i\!:\,\ a^n\equiv (\color{#c00}{a^{\,\large p_i-1}})^{\Large\color{#0a0}{\frac{n}{p_i-1}}\!}\equiv \color{#c00}1^{\Large\color{#0a0}{\frac{n}{p_i-1}}}\equiv 1\,\Rightarrow\, p_i\mid a^n-1\,\Rightarrow\, p_1 p_2\mid a^n-1$
A: Hint : For $(a,5)=1$ only possibilities are : $a=5k+1;5k+2;5k+3;5k+4$
$(5k+1)^{12}\equiv 1\mod5$ case should be clear...
$(5k+2)^{12}\equiv 1\mod 5$ should be clear if you know what $2^{12}$ is... 
$(5k+3)^{12}\equiv 1\mod 5$ should be clear if you know what $3^{12}$ is... 
$(5k+4)^{12}\equiv 1\mod 5$ should be clear if you know what $4^{12}$ is... 
You may repeat this kind of strategy for case of $7$ and conclude what you wanted to...
