Number of solutions of $x^m-y^m=a \pmod p$ I'm interested in the total number of solutions of $x^m-y^m\equiv a \pmod p$ where $p$ is prime.
Is there any way to estimate the total number of solutions ?
I found https://www.degruyter.com/view/journals/crll/1935/172/article-p151.xml?language=en is related, but I cannot read German.
 A: I am interpreting the question to have fixed $p,m,a$ and $x,y$ unknown.
We are obviously only interested in pairwise non-congruent solutions. Or rather, we let $x,y$ range over $\Bbb{Z}_p$, and want to estimate the number of pairs $(x,y)\in\Bbb{Z}_p^2$ satisfying $x^m-y^m=a$. I am replacing congruences modulo $p$ with equations in $\Bbb{Z}_p$ in all that follows. Denote the number of such pairs by $N(m,p,a)$.
Let's first record the standard fact:
$$
N(m,p,a)=N(d,p,a),
$$
where $d=\gcd(m,p-1)$. This follows from the basic properties of cyclic groups. Clearly $x^m=0$ iff $x=0$. The multiplicative group $\Bbb{Z}_p^*$ is known to be a cyclic group of order $p-1$. Therefore the mapping $f:x\mapsto x^m$ is a homomorphism of groups. Its kernel $N$ has size $d$ and its image $M$ thus has size $(p-1)/d$, each element of $M$ the image of a coset of $N$. The exact same thing happens with the mapping $\tilde{f}:x\mapsto x^d$, and the claim follows from this. Ask, if you need something fleshed out (most likely that's done in some other thread on the site already).
The point of that observation was to make $m$ smaller as we can replace it with $d$, and assume that $m\mid p-1$. On with the main business.
The case $a=0$, i.e. the equation $x^m=y^m$, is a special case. With the assumption $m\mid p-1$ in place we can give the exact number of solutions. We have the trivial solution $(x,y)=(0,0)$. If $x$ is non-zero, then $x^m=y^m$ is equivalent to $1=(y/x)^m$
which holds if and only if $y/x\in N$. Therefore to each non-zero choice of $x$ there are exactly $m$ solutions $y$. Hence we can conclude that
$$
N(m,p,0)=1+m(p-1).
$$
On with the main case $a\neq0$, when we bring out the big guns of algebraic geometry.
The equation $x^m=y^m+a$ defines a plane curve. Its projective version, call it $C$, is defined by
the homogenized polynomial equation
$$
F(X,Y,Z):=X^m-Y^m-a Z^m=0.
$$
Here the gradient
$$\nabla F(X,Y,Z)=(mX^{m-1},-mY^{m-1},-amZ^{m-1})$$
vanishes only at $(X,Y,Z)=(0,0,0)$ so $C$ is non-singular. Therefore
the genus-degree formula says that $C$ has genus
$$
g=\frac12(m-1)(m-2).
$$
Next we count the number of points of $C$ on the line at infinity, $Z=0$. We are back in (the projective version of) the case $a=0$, and can conclude that there are exactly $m$ points on the line at infinity, namely $[X:Y:Z]=[1:\zeta:0]$ with $\zeta\in N$ and $m$th root of unity.
It remains to call upon the results of André Weil giving an upper bound on the difference $\#C(\Bbb{Z}_p)-(p+1)$
of the number of $\Bbb{Z}_p$-rational points of $C$ and $p+1$ (=what we would get if $C$ were a line).
$$|N(m,p,a)+m-(p+1)|\le 2g\sqrt p=(m-1)(m-2)\sqrt p.$$
Basically it says that the number of solutions is $\approx p$, if $m$ is very small in comparison to $p$, and gives an upper bound on the deviation from that expected number otherwise.
Weil's bound becomes in some sense the best possible, if we also consider solutions in the extension field $\Bbb{F}_q, q=p^n$ of $\Bbb{F}_p=\Bbb{Z}_p$. A lot is also known about some special values of $m$. The case $m=3$ being a particularly interesting case as then $g=1$, so we have an elliptic curve.
A: Partial answer: (if $x,y,m,p,a$ are all taken as variables)
The number of integers in the range $[1, n]$ which can be expressed in the form $a^x−b^y$ is asymptotically $$(\log n)^2 \over {2(\log a)(\log b)}$$ as $n \rightarrow \infty$. This is from a result of Pillai. See: Waldschmidt M., Perfect Powers: Pillai’s works and their developments
Also, the equation $p^x − b^y = c$ has been considered by R. Scott in this paper.

The equation $p^x − b^y = c$, where $p$ is prime, and $b > 1$ and $c$
are positive integers, has at most one solution $(x, y)$ when $y$ is
odd, except for five specific cases, and at most one solution when $y$
is even.


Answer: (if $a,p$ are given and $x,y.m$ are allowed to vary)
Let $g$ be a primitive element in the field $GF(p)$. So we have $x = g^r, y = g^s, a = g^t$ for some $r,s,t \in GF(p)$ and $x,y,a$ non-zero elements of $GF(p)$.
$$g^r - g^s \equiv g^t \mod p$$
$$g^{r-t} - g^{s-t} \equiv 1 \mod p$$
$$g^{r-t} \equiv g^{s-t} + 1 \mod p$$
The LHS is non-zero elements in $GF(p)$. The LHS cannot also be $1$ because then $g^{s-t}$ must be 0, which is not possible.
Since every element other than $0$ and $1$ in $GF(p)$ can be represented as a sum of its predecessor + 1 modulo $p$ and the predecessor can also be represented as the power of a primitive element $g$, there are solutions $\forall x,y,a \in GF(p)$ for any given $m$ where the LHS is not $0$ or $1$.
Since there are $p$ values in $GF(p)$ and $0$, $1$ are not representable in the form, we have $p-2$ solutions modulo $p$ for given $a, p, a \ne 0$.
If $a = 0$, we have $p$ trivial solutions $x^m \equiv y^m \mod p$ given by $x \equiv y \mod p$.
A: I am assuming $m$ can be equal to anything and that $m$ can also be equal to $p$.
An easier solution is $a = 0$ when $x = y$ (and I hope you know how we get it).
Case 1 : $m = p$
$$\implies x^m \equiv x (\mod{p})$$
and $$y^m \equiv y (\mod{p})$$
(Using Fermat's little theorem)
$\implies x^m - y^m \equiv x - y (\mod{p})$
$\implies x - y = a$
So you have one solution here.
Case 2 : $m = np$ for some $n$
$$\implies x^m = (x^n)^p \equiv x^n (\mod{p})$$
and
$$y^m = (y^n)^p \equiv y^n (\mod{p})$$
$\implies x^m - y^m = (x^n)^p - (y^n)^p \equiv x^n - y^n \equiv a(\mod{p})$( Using Fermat's little theorem)
Another solution.
Case 3: $m$ and $p$ are relatively prime
If $x, y > p$ :
if $x \equiv u (\mod{p}), x^m \equiv u^m (\mod{p})$
if $y \equiv v (\mod{p}), y^m \equiv v^m (\mod{p})$
Here $a \equiv u^m - v^m (\mod{p})$
And $a$ should vary depending on $u$ and $v$, and for $u > v$, you can have $p$ values for $a$ ($0$ through $p - 1$).
For sure, there should be three solutions, plus some more from the third case.
Note : You can have only one solution for $a$ for a constant $u$ and $v$.
