<s>[INST] Find $ n\geq1 $ such that 7 divides $n^n-3$ Find $ n\geq1 $ such that 7 divides $n^n-3$.
Here is what I found:
$ n\equiv 0 \mod7, n^n\equiv 0 \mod7,n^n-3\equiv -3 \mod7$ no solution.
$ n\equiv 1 \mod7, n^n\equiv 1 \mod7,n^n-3\equiv -2 \mod7 $ no solution.
$ n\equiv 2 \mod7, n^n\equiv 2^n \mod7, n^n-3\equiv 2^n-3 \mod7$. Is $2^n\equiv 3 \mod7 $ possible? 
$ n=7k+2,..., 2^{7k+2}\equiv 2^{k+2} \mod7$. Is $2^{k+2}\equiv 3 \mod7$ possible?
Studying $k$ modulo 6: $2^{6q+2}\equiv 4 \mod7, 2^{6q+3}\equiv 1 \mod7, 2^{6q+4}\equiv 2 \mod7, 2^{6q+5}\equiv 4 \mod7, 2^{6q+6}\equiv 1 \mod7, 2^{6q+7}\equiv 2 \mod7 $ 
The congruence is never 3 so there is no solution for $n\equiv 2 \mod7$.
$ n\equiv -2 \mod7,..., n=42q+5 $ 
$ n\equiv-1 \mod7, n^n-3\equiv (-1)^n-3 \mod7 $: no solution.
$ n\equiv 3 \mod7, n^n-3 \equiv 3^n-3 \mod7$. Is $3^n\equiv 3 \mod 7$ possible?
$n=7k+3,..., 3^{7k+3}\equiv -3^k \mod7 $. Is $3^k \equiv 4 \mod 7 $ possible?
Studying $k$ modulo 6:
$ 3^{6q} \equiv 1 \mod7, 3^{6q+1} \equiv 3 \mod7, 3^{6q+2} \equiv 2 \mod7, 3^{6q+3} \equiv -1 \mod7, 3^{6q+4} \equiv 4 \mod7 , 3^{6q+5} \equiv -2 \mod7 $
So $ n=7k+3=7(6q+4)+3=42q+31 $ is a solution.
$ n\equiv -3 \mod7 $,..., there is no solution.
$42q+31 \equiv 3 \mod 7, (42q+31)^{42q+31} \equiv 3^{42q+31} \mod 7 \equiv 3 \mod7$ OK
$ 42q+5 \equiv 4 \mod7, (42q+5)^{42q+5} \equiv 5^{42q+5} \mod 7 \equiv 3 \mod7$ OK
So 7 divides $ n^n-3 $ if and only if $ n\equiv 31 \mod 42$ or $ n\equiv 5 \mod 42$
 [/INST] $$
5^5-3=2\cdot 7\cdot 233
$$
Other solutions are 
$$n=31, 47, 73, 89, 115, 131, 157, 173, 199, 215, 241, 257, 283, 299, 325$$
All of them are odd and congruent to $3$ or $5$ modulo $7$.
</s>