TITLE: Solving $x^x \equiv x \pmod{17}$.
QUESTION [7 upvotes]: Momentarily I am studying group of units, and this question seems a bit strange. How could I solve $x^x \equiv x \pmod{17}$?

REPLY [5 votes]: 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$.