Prove that if $k\ge 1\,$ and $\,a^k\equiv 1\pmod{\! n}$ then $\gcd(a,n)=1$ 
Let $p$ be a prime such that $a^p-1 \equiv 0 \pmod{p}$. Prove that $\gcd(a,p) = 1$.

We know from Fermat's Little Theorem that $a^{p-1}-1 \equiv 0 \pmod{p}$ if and only if $\gcd(a,p) = 1$, but how do we use this to solve the question?

It is a special case of the general fact that $\,a\,$ invertible mod $\,n\,$ implies $\,\gcd(a,n)= 1.\,$ Indeed, $\,aj\equiv 1\pmod{n}\,\Rightarrow\, aj+kn = 1\ $ so $\ d\mid a,n\Rightarrow\, d\mid 1,\,$ therefore $\,\gcd(a,n) = 1$.
OP is a special case since $\,{\rm mod}\ p\!:\  a^p-1\equiv 0\, \Rightarrow a(a^{p-1})\equiv 1\,$ so $\,a\,$ is invertible mod $\,p.$
Remark $\ $ The converse is also true, i.e. $\,\gcd(a,n) = 1\,\Rightarrow\,a\,$ is invertible mod $\,n,\,$ since by the Bezout identity for the gcd $\, \gcd(a,n) = 1\,\Rightarrow\, aj+kn = 1\,$ for some integers $\,j,k.\,$ Reducing this equation mod $\,n\,$ we obtain the congruence $\,aj\equiv 1\pmod n,\,$ i.e. $\,a^{-1}\equiv j\pmod n$
That fact that $\ a\,$ is invertible mod $\,n\iff \gcd(a,n)= 1\ $ is  fundamental and ubiquitous in elementary number theory, so one should be sure to be intimately familiar with it.
