Solving $x^x \equiv x \pmod{17}$. Momentarily I am studying group of units, and this question seems a bit strange. How could I solve $x^x \equiv x \pmod{17}$?
 A: What is $x$ here? Since it makes no sense to put a congruence class modulo $17$ into an exponent when we’re working in the ring $\Bbb Z/17\Bbb Z$, it seems to me that $x$ must be an integer, i.e. in $\Bbb Z$.
For nonnegative integers $x$ and $n$, $x^n$ is always defined except in the case that both are zero. So, for instance, if $x$ is positive and divisible by $17$, we always have $x^x\equiv x\pmod{17}$. Similarly, the desired congruence holds when $x\equiv1\pmod{17}$, even for negative values of $x$.
More interesting is the case $x\equiv2\pmod{17}$. Then the multiplicative order of $2$ is eight, so we have solutions whenever also $x\equiv1\pmod8$. Such as $x=121$, and you see that $x\equiv121\pmod{136}$ describes all such solutions, since $136=17\cdot8$.
And so it goes. There is a solution $x^x\equiv x\pmod{17}$ for every possible congruence of $x$ modulo $17$, and how many there are depends on the multiplicative order of $x$ modulo $17$.
A: I would use the finite equivalent of logarithms, as follows:
For $x\neq 0$ let $x=r^n$ where $r$ is a primitive root modulo $17$, (therefore $r^{16}=1$). You then have $r^{nx}=r^n$ and $nx \equiv n \bmod 16$.
Now $n=0$ is a solution to the congruence, with $x=1$ and this is compatible with $x=r^n$.

There was a careless error in the original. Always best to multiply rather than dividing ...
Correctly, we have $n(x-1)\equiv 0 \bmod 16$
$x=1$ will do and we've done that. 
Otherwise we need $n$ even. Now fix a primitive root - $3$ will do. The even powers of $3$ give (bearing in mind that $x$ is reduced modulo $17$) $n=2, x=9$; $n=4, x=13$; $n=6, x=15$; $n=8, x=16$; $n=10, x=8$; $n=12, x=4$; $n=14, x=2$
Only $x=9$ and $x=13$ solve the congruence mod $16$.
