Show that the prime number $p=4n+1$ is a divisor of $n^{n}-1$
Ok, the question itself is simple as hell, but I couldn't think of a simple way to solve this question. I tried to solve the question by using $p\equiv 1 \pmod n$ but only to fail miserably... I couldn't use quadratic residue concept neither since n could be odd.
It would be really glad if some could figure it out using methods of elementary number theory such as primitive root, Jacobian symbols and so on (since I'm just a beginner for number theory stuff).
Thanks!
We know that $n$ is a quadratic residue modulo $p$, since $1 = \left( \frac{-1}{p}\right) = \left(\frac{4n}{p}\right) = \left(\frac{n}{p}\right)$. Let $k^2 \equiv n \pmod{p}$. Then
$$(k+2n)^2 = k^2 + 4nk + 4n^2 \equiv n -k - n \equiv -k \pmod{p},$$
so $n$ is in fact a fourth power, $n \equiv (k+2n)^4 \pmod{p}$. Hence
$$n^n \equiv (k+2n)^{4n} = (k+2n)^{p-1} \equiv 1 \pmod{p}.$$