I am trying to prove the following theorem: If $n$ is a Fermat Pseudoprime to the base $a$ then $n$ and $a$ are relatively prime.
As a recap a Fermat Pseudoprime $n$ has the property that for $n$ not being prime if for all $a$ such that $2\leq a \leq n-1$ $$a^{n-1}\equiv 1\,\, (mod\, n)$$
I tried it in a following way but am not sure if it is correct. I tried by using the proof by contrapositive method:
If $n$ and $a$ are not relatively prime then either $n>a$ or $n\leq a$.
In the first case I can then write $n=\alpha a$. Now we need to show that $$a^{n-1}\neq 1 (mod \, n)$$ Clearly $$n\nmid a^{n-1}-1$$ because that is the same as saying: $$\alpha a\nmid a^{n-1}-1$$ here the second term is not a whole number so therefore $n$ cannot be a pseudoprime.
For the second case: $a=\alpha n$
In that case we have to show again that $$a^{n-1}\neq 1 (mod \, n)$$ or written differently: $$(\alpha n)^{n-1}\neq 1 (mod \, n)$$ Thus again $$n\nmid (\alpha n)^{n-1}-1$$ because the second term is not a whole number.
Is this proof correct?