# Is it possible to derive $m < p^k$ from the Diophantine equation $m^2 - p^k = 4z$ unconditionally, when it is solvable?

This question is an offshoot of this earlier one.

Allow me to state my question in full:

Is it possible to derive $$m < p^k$$ from the Diophantine equation $$m^2 - p^k = 4z$$ unconditionally, where $$z \in \mathbb{N}$$ and $$p$$ is a prime satisfying $$p \equiv k \equiv 1 \pmod 4$$, when it is solvable? (Note that I am only considering those $$p$$ and $$m$$ for which $$\gcd(p,m)=1$$.)

In the OP's attempt to solve the equation $$m^2 - p^k = 4$$, it is shown that $$p=5, k=1, m=3,$$ from which we have $$3 = m < p^k = 5^1 = 5.$$

Additionally, in a comment, the OP solves the equation $$m^2 - p^k = 64$$ and shows that $$p=17, k=1, m=9,$$ from which we get $$9 = m < p^k = {17}^1 = 17.$$

The accepted answer considers the equation $$m^2 - p^k = 2^{2n+2}.$$ MSE user mathlove gave the solution $$p=2^{n+2} + 1, k=1, m=2^{n+1} + 1,$$ provided $$2^{n+2} + 1$$ is prime.

Note that mathlove's solution gives $$2^{n+1} + 1 = m < p^k = \bigg(2^{n+2} + 1\bigg)^{1} = 2^{n+2} + 1.$$

MY OWN ATTEMPT

I tried adding $$p^k - m$$ to both sides of $$m^2 - p^k = 4z,$$ but that did not really get me anywhere.

ADDED TO QUESTION ON FEB. 21, 2020 (10:20 PM MANILA TIME)

(This was added in response to a comment from MSE user Servaes.) I would like to specify that I am considering the divisibility constraint $$\gcd(p,m)=1$$ to hold.

• I don't understand; simply plugging in $m=p^k$ yields $$z=\frac{m^2-p^k}{4}=\frac{p^{2k}-p^k}{4}=p^k\frac{p^k-1}{4},$$ which is an integer as $p\equiv1\pmod{4}$. So the equation is solvable for every choice of $p$ and $k$ with $p\equiv k\equiv 1\pmod{4}$, and there always exists a solution $m$ with $m\geq p^k$. Feb 21, 2020 at 14:13
• @Servaes, thank you for your comment and attention. As you can see, the examples for $z=1$ and $z=16$ clearly indicate that $m < p^k$ is possible. Would you mind fleshing out your last comment as an actual answer (and include additional details, as needs be)? Feb 21, 2020 at 14:18
• It is not clear to me what the question is. Which variables are given and which are to be solved for? And do you want to show that there exist solutions with $m<p$, or that all solutions have $m<p$? Feb 21, 2020 at 14:39
• The latter is impossible; if $(p,k,m)$ is a solution for some $z_0$, then $(p,k,m+4p^k)$ is a solution for $z=z_0+2p^k(m+2p^{2k})$, where of course $\gcd(p,m+4p^k)=\gcd(p,m)=1$ and $m+4p^k>p^k$ if we take $m$ positive. Feb 21, 2020 at 14:47
• More simply put; for any odd $m$ you have $m^2-p^k=4z$ for some integer $z$, so in fact $m$ can be arbitrarily large compared to $p^k$. Feb 21, 2020 at 14:50

$$m^2-p^k=4z$$
is not enough to say that $$m. Take as a counterexample $$m=9$$, $$p=5$$, $$k=1$$, and $$z=19$$. Then
$$9^2-5^1=81-5=76=4\cdot 19$$
Of course, there may be a solution to $$z=19$$ such that $$m, but it requires more work to prove that this would always be the case for all $$z$$ where a solution exists.