I need to prove the following: $$\begin{aligned} &\text { Prove that } a^{N-1} \not\equiv 1(\bmod N) \text { if } \operatorname{gcd}(a, N)>1, \text { where } a, N \in \mathbb{Z} \text { and }\\ &N \geq 1 \end{aligned}$$
My attempt on a solution. set $d=gcd(a,N)>1$. Since $d$ divides a, we have: $$a\equiv 0 (\bmod d)$$ using this repeatedly we have: $$a^{N-1}\equiv 0 (\bmod d)$$
Since $d\mid N$ does that imply: $$\implies a^{N-1}\equiv 0 (\bmod N)$$?
I'm not quite convinced that this is true. If $d\mid a^{N-1}$ and $d \mid N$. Does that imply $N \mid a^{N-1}$? And how should I use the assumption $d>1$?.
I believe it would be obvious if it was the other way around. if $N \mid d$
Let $d=gcd(a,N)>1$. assume for contradiction that $a^{N-1}\equiv 1(\bmod N)$. Since $d\mid N$ this implies $$a^{N-1}\equiv 1(\bmod d)$$ which is a contradiction. Since $d\mid a$ implies $a\equiv 0 (\bmod d)$ which again implies $$a^{N-1}\equiv 0 (\bmod d) \not\equiv 1 (\bmod d)$$
– sjm23 Sep 27 '20 at 13:03