Integer solutions to $x^x=122+231y$ How can I find the integer solutions to the following equation (without a script or trial and error)?
$$x^x=122+231y$$

The function $f_a:\Bbb N\to\Bbb Z_p$ defined as $f_a(x)=a^x$ where $a\in\Bbb Z_p^*$ is periodic and its period is a divisor of $p-1$. Then the modular equation $x^x\equiv 2 \pmod 3$ has only to be checked for $x\in\{1,\ldots,6\}$. And
$$1^1\equiv 1\pmod 3$$
$$2^2\equiv 1\pmod 3$$
$$3^3\equiv 0\pmod 3$$
$$4^4\equiv 1\pmod 3$$
$$5^5\equiv 2\pmod 3$$
$$6^6\equiv 0\pmod 3$$
Therefore, if $x$ is a solution, then $x\equiv 5\pmod 6$.
Now, write $x=5+6k$ and try to find solutions for
$$(5+6k)^{5+6k}\equiv 3\pmod 7$$
but, by LFT, this is equivalent to
$$(5+6k)^{-1}\equiv 3\pmod 7$$
or
$$5+6k\equiv 5\pmod 7$$
so $k$ is a multiple of $7$, that is, $x=5+42j$.
Now we have to deal with the last prime factor of $231$, that is, $11$.
$$(5+42j)^{5+42j}\equiv(5-2j)^{5+2j}\equiv 1\pmod {11}$$
There are some possibilities now:


*

*$5-2j\equiv1\pmod{11}$ which gives $x=462m+89$.

*$5-2j\equiv -1\pmod{11}$ and $5+2j$ is even. But this is impossible.

*$5-2j\equiv 4,5,9\text{ or }3\pmod{11}$ and $5+2j$ is a multiple of $5$, which gives $x=2310m+5$, $845$, $1895$ or $2105$.

*$5+2j$ is multiple of $10$, which is impossible.


To sum up, the solutions are the positive integers of the form
$$x=\left\{
\begin{array}{l}
89+462m\\
5+2310m\\
845+2310m\\
-405+2310m\\
-25+2310m
\end{array}
\right.$$
where $m$ is an integer.
Some solutions for $x$: $5$, $89$, $551$, $845$, $1013$, $1475$, ...
