# Some Number Theory

Let $x_n$ be the remainder when $x$ is divided by $n.$ Compute the sum of all positive integers that satisfy

$\it x^5 \left( x_5 \right)^5 - x^6 - \left( x_5 \right)^6 + x \left( x_5 \right) = 0.$

The term $x_5$ is pretty nasty to look at. To solve this inconvenience to our eyes, we shall let $y=x_5$. We now have

$x^5y^5 - x^6 - y^6 + xy = 0.$

Those who have taken math with the Art of Problem Solving will note this looks a lot like Simon’s Favorite Factoring Trick (coincidence?). We can factor the above into

$(x^5 - y)(y^5 - x) = 0.$

This tells us that either $y^5=x$ or $x^5=y$. Since $y$ is the remainder of dividing $x$ by $5$, $y$ can only be $1,2,3$ or $4.$ Note that $y$ cannot be $0$ otherwise $x$ would also be $0$ and we want $x$ to be positive.

So if $y^5=x$ or $x^5=y$, we have

\begin{aligned} 1^5 &= 1, \\ 2^5 &= 32, \\ 3^5 &= 243, \\ 4^5 &= 1024. \end{aligned}

So the possible values of $x$ are $1,32,243,$ or $1024.$ Now remember: $y$ is the remainder of $x$ divided by $5$. So we need to make sure that each $(x,y)$ pair holds true to this definition. We find the following

\begin{aligned} 1^5=1 &\equiv 1 \pmod 5,\\ 2^5=32 &\equiv 2 \pmod 5,\\ 3^5=243 &\equiv 3 \pmod 5,\\ 4^5=1024 &\equiv 4 \pmod 5. \end{aligned}

The above is not a coincidence: it is true by Fermat’s Little Theorem.

Our answer, therefore, is $1 + 32 + 243 + 1024=\boxed{1300}$.