Under what conditions is it true that $m^2 – a$ is not a square if and only if $(m – 1)^2 < m^2 – a 0$

conjectureselementary-number-theoryinequalityperfect numberssquare-numbers

Preamble: The present inquiry is an offshoot of this MSE question from February 21, 2019, and ultimately, Theorem III.2, page 2 from a paper submitted to a conference organized by De La Salle University-Manila. I was supposed to deliver a talk regarding this topic on September 22, 2009, but I was unable to attend, due to a schedule conflict with my work back then. (My apologies.) The main impetus for this latest MSE question is my having recently found this MSE question.


PROBLEM STATEMENT

Under what conditions is it true that
$$m^2 – a \text{ is not a square } \iff (m – 1)^2 < m^2 – a < m^2,$$
where $a>0$?


MY ATTEMPT

Let $a>0$. If $m^2 – a$ satisfies the inequality
$$(m – 1)^2 < m^2 – a < m^2$$
then $m^2 – a$ is obviously not a square, as it is between two consecutive squares.

Alas, this is where I get stuck, as I currently do not know how to prove the converse.

SEARCH FOR COUNTEREXAMPLES

I ran the following Pari-GP script to search for counterexamples to the converse, however, no output was returned in the range $1 \leq m \leq {10}^{10}$ and $1 \leq a \leq {10}^{10}$:

for(x=1, 10000000000, for(y=1, 10000000000, if(!issquare(x^2 - y) && (x^2 - y <= (x-1)^2),print(x,"     ",factor(x),"     ",y,"     ",factor(y)))))

OPTIMIZED SCRIPT (communicated by Brian Moehring):

for(x=2, 105, for(y=2*x, x^2, if(!issquare(x^2 - y),print(x,"     ",y))))

I am therefore led to believe that the criterion indeed holds. (There might have been a bug/error with Pari-GP script processing in Sage Cell Server while I was executing my scripts. I am not an expert on determining computer time/space requirements for running a program/script, but Brian Moehring has already pointed out in this comment that my original script would have caused the servers to fail to give an output for my computational request, so I will have to defer to his opinion.) As pointed out by TonyK in a comment, $m=5$ and $a=15$ is a counterexample to the converse. (There are literally a lot of them.)

I would, of course, still be interested in researching the conditions under which the criterion holds. Hence, this question.


CONTEXT

Specifically, let $N = p^k m^2$ be an odd perfect number with special prime $p$ satisfying $p \equiv k \equiv 1 \pmod 4$ and $\gcd(p,m)=1$. Then it is known that $m^2 – p^k$ is not a square, granted we could prove that
$p < m$ and $m^2 – p^k$ is not a power of two.

UPDATE: Here is a conclusive proof that $m^2 – p^k$ is not a square. (It turns out that one does not need the extra assumption that $m^2 – p^k$ is not a power of two.) Assume to the contrary that $m^2 – p^k = n^2$. Then as proved in this MSE question, we derive $m = (p^k + 1)/2$. Now, in this answer, MSE user FredH proves that the assumption $k \neq 1$ contradicts
$$\gcd(p^{k+1}-1, (p-1) p^k (p^k + 1)^2) \leq (p-1)\gcd(p^{k+1}-1,p^k+1)^2,$$
which follows from
$$\sigma(p^k) \sigma(m^2) = 2p^k m^2 \tag{$**$}$$
and therefore,
$$2(p^{k+1}-1) \sigma(m^2) = (p-1) p^k (p^k + 1)^2.\tag{$*$}$$
Equation $(*)$ is obtained by substituting $m = (p^k + 1)/2$ in Equation $(**)$. Since $m = (p^k + 1)/2 < p^k$, the assumption $p < m$ implies $k \neq 1$, whereupon we have the implication
$$p < m \implies m^2 – p^k \text{ is not a square}.$$
By the contrapositive, we obtain
$$m^2 – p^k \text{ is a square} \implies m < p \implies k = 1.$$
But then we also know that
$$m^2 – p^k \text{ is a square} \iff m = (p^k + 1)/2 \iff p^k = 2m – 1.$$
But we already know that $k=1$ follows from the given assumption, so that
$$p = 2m – 1.$$
However, Acquaah and Konyagin essentially proved in (IJNT, 2012) that if $p$ is the special prime factor of an odd perfect number $p^k m^2$, then the implication
$$k = 1 \implies p < m\sqrt{3}$$
holds.
Together with the implication
$$k > 1 \implies p < m$$
as proved by Dris in (JIS, 2012), we know unconditionally that
$$p < m\sqrt{3}$$
must hold. But recall that we have $2m – 1 = p$. We infer that
$$2m – 1 = p < m\sqrt{3}$$
which is equivalent to
$$m(2 – \sqrt{3}) < 1.$$
This contradicts the fact that $m$ is a humongous number. (In fact, one can compute the lower bound $m > {10}^{375}$, and this follows from Ochem and Rao's $N > {10}^{1500}$ (Math. Comp. (2012) and the estimate $p^k < m^2$ by Dris in (JIS, 2012).)

Hence, $m^2 – p^k$ is not a square. (Additionally, since $4 \mid (m^2 – p^k)$, then $m^2 – p^k$ is likewise not squarefree.)

Since $m^2 – p^k$ is not a square and $m^2 – p^k$ is divisible by $4$, then we infer that $m^2 – p^k = 2^r t$ where we necessarily have $r \geq 2$ and $2^r \neq t$. (I am not really sure whether the exponential Diophantine equation $m^2 – p^k = 2^r t$ will force $\gcd(2,t)=1$, if $r \geq 2$ and $2^r \neq t$.)

Notice that all of the variables $m, p, k, r,$ and $t$ are actually not known, a priori. But we may try testing heuristics (e.g. inequalities or equations) relating their values, using the Descartes spoof as an "experimental/combinatorial sample".

This particular topic is currently not my cup of tea. Hence, this question.

Best Answer

Under what conditions is it true that $$m^2 - a \text{ is not a square } \iff (m - 1)^2 < m^2 - a < m^2,$$ where $a>0$?

We know it is true that $$(m - 1)^2 < m^2 - a < m^2\implies m^2 - a \text{ is not a square }$$

So, what we want to know is that under what conditions it is true that $$m^2 - a \text{ is not a square } \implies (m - 1)^2 < m^2 - a < m^2\tag2$$

  • A proof that $0\lt a\lt 2m-1$ is necessary : Suppose that $m^2-a$ is not a square with $a\geqslant 2m-1$. Then, we have $m^2-a\leqslant m^2-(2m-1)=(m-1)^2$. So, $(m-1)^2\lt m^2-a$ does not hold.

  • A proof that $0\lt a\lt 2m-1$ is sufficient : If $m^2 - a$ is not a square with $0\lt a\lt 2m-1$, we have $m^2-a>m^2-(2m-1)=(m-1)^2$ and $m^2-a<m^2$.

Therefore, we can say that under the condition that $0\lt a\lt 2m-1$, it is true that $$m^2 - a \text{ is not a square } \iff (m - 1)^2 < m^2 - a < m^2$$


From what we've got, we can say that under the condition that $p^k\lt 2m-1$, it is true that $$m^2 - p^k \text{ is not a square } \iff (m - 1)^2 < m^2 - p^k < m^2$$


Since $m^2 - p^k$ is not a square and $m^2 - p^k$ is divisible by $4$, then we infer that $m^2 - p^k = 2^r t$ where we necessarily have $r \geq 2$ and $2^r \neq t$. (I am not really sure whether the exponential Diophantine equation $m^2 - p^k = 2^r t$ will force $\gcd(2,t)=1$, if $r \geq 2$ and $2^r \neq t$.)

For each positive integer $N$, if we define $u$ as a non-negative integer satisfying both $2^u\mid N$ and $2^{u+1}\not\mid N$, and $v$ as $\cfrac{N}{2^u}$, then there is only one such pair of integers $(u,v)$, and $u,v$ satisfy $$N=2^uv,\qquad u\geqslant 0,\qquad v\gt 0,\qquad v\equiv 1\pmod 2$$

Examples :

  • For $N=24$, $(u,v)=(3,3)$.

  • For $N=59$, $(u,v)=(0,59)$.

  • For $N=138$, $(u,v)=(1,69)$.

  • For $N=1024$, $(u,v)=(10,1)$.

Similarly, if we define $r$ as a non-negative integer satisfying both $2^r\mid m^2-p^k$ and $2^{r+1}\not\mid m^2-p^k$, and $t$ as $\cfrac{m^2-p^k}{2^r}$, then there is only one such pair of integers $(r,t)$, and $r,t$ satisfy $$m^2-p^k=2^rt,\qquad r\geqslant 2,\qquad t\gt 0,\qquad t\equiv 1\pmod 2$$

So, if you define $r,t$ as above, then the integers $r,t$ are not independent from $m,p$ and $k$. The integers $r,t$ are determined by $m,p$ and $k$, so the $r$ means $r(m,p,k)$, and the $t$ means $t(m,p,k)$. Since $t$ is, by the definition, odd, we can say that $\gcd(2,t)=1$.

If you don't define $r,t$ as above (in other words, if you are just writing $m^2-p^k=2^rt,r\geqslant 2,2^r\not=t$), then there are many such pairs $(r,t)$. For example, if $m^2-p^k=192$, then we have $192=2^2\cdot 48=2^3\cdot 24=2^4\cdot 12=2^5\cdot 6=2^6\cdot 3$, so $(r,t)=(2,48),(3,24),(4,12),(5,6),(6,3)$. So, $t$ can be even. On the other hand, if you define $r,t$ as above, we get only one pair $(r,t)=(6,3)$ where $t$ is odd.