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$$
 A: 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$, ...
A: By the Chinese Remainder Theorem, to know the value of $x^x$ modulo $231$ we only need to know it modulo $3,7,11$.
The value of $x^y$ modulo $n$ depends on the values of $x$ modulo $n$ and $y$ modulo $\phi(n)$.
So if $n$ is prime, the value of $x^x$ modulo $n$ depends on $x$ modulo $n(n-1)$.
A computation gives that
$x^x \equiv 122 \pmod 3 \iff x^x \equiv 2 \pmod 3 \iff x \equiv 5 \pmod 6$,
$x^x \equiv 122 \pmod 7 \iff x^x \equiv 3 \pmod 7 \iff x \equiv 5,31 \pmod {42}$
So far we know that we must have $x \equiv 5 \pmod {42}$.
Out of the $28$ solutions modulo $110$ to $x^x \equiv 122 \pmod {11}$, only $9$ are congruent to $1$ modulo $2$, and those are $1,5,15,23,25,45,67,75,89$ modulo $110$.
So modulo $2310$, we have $9$ solutions to $x^x = 122 \pmod {231}$, and they are $x \equiv 5,89,551,845,1013,1475,1895,1937,2105 \pmod {2310}$
A: We are attempting to solve:
$$ x^x \equiv 122 \  \mod \ 231  $$
Thus we naturally would want to factor 231 which is
$$ 3*7*11 $$
Thus we can break this into a system of 3 modular equations
$$ x^x \equiv 2 \mod \ 3$$
$$ x^x \equiv 3 \mod \ 7$$
$$ x^x \equiv 1 \mod \ 11$$
upon exploring the equation it appears there are solutions of the form respectively for
$$ x \equiv 5 \mod \ 6$$ (appears to solve the mod 3)
$$ x \equiv 5 \mod \ 84 $$ (appears to solve the mod 7)
And:
$$ x \equiv 1 \mod \ 11 $$ (solves the mod 11 but isn't the only case)
Why these in particular? I don't know...
Its worth noting
$$ x \equiv 0 \mod 5 $$ (the other apparent case)
Appears to imply
$$ x \equiv 1 \ or \ -1 \mod 11 $$  
Again: it appears now that:
$$ j*84*10^k + 5 $$ is constant for all k > 0 for fixed j
specifically if j = 0 or j = 1 then for all k > 0 this appears to be solution:
sample solutions include:
5,89, 845, 8405, 84005 etc...
