1

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.

Bill Dubuque
  • 282,220
  • That Converse is not true ! – Prem May 04 '23 at 15:01
  • 4
    As asked, it is obviously not true. For instance, take $m=5$ and $a=15$. Then $m^2-a=10$ is not a square, but it is not true that $(m-1)^2<m^2-a<m^2$. Perhaps you meant to ask something else? – TonyK May 04 '23 at 15:05
  • 5
    Just choose any $a$ less than $2m-1$. If $m$ is large, nearly every such $a$ is a counterexample. I don't know how you missed them all! – TonyK May 04 '23 at 15:09
  • After making my Initial Comment , I have been staring @ that Script , @TonyK , to figure where OP went wrong. I think the numbers are too large & Execution takes time. Changing that to 123 & Executing , I quickly got hundreds of Counter-Examples ! [[ CODE : https://sagecell.sagemath.org/?z=eJxLyy_SqLA11FEwNIADHYU0oGglhmhmmoZiZnFxYWliUapGRZyRgq5CpaaCmpoCjKNgYwtk6xpqxhlp6hQUZeaVaFToKCmAgJJOWmJyCcgyTbhIJbpcpSYIAACbcyRY&lang=gp&interacts=eJyLjgUAARUAuQ== ]] – Prem May 04 '23 at 15:24
  • Since $a>0$, the inequality $m^2-a < m^2$ is redundant.

    Suppose that $m^2-a$ is not a square. You ask under what conditions you have that $(m-1)^2<m^2-a$. Well, you can say that it holds under the condition that $$(m-1)^2<m^2-a$$ which is equivalent to $2m<a+1$. But this has nothing to do with squares.

    – Crostul May 04 '23 at 15:25
  • I don't see how there could be any non-trivial conditions that would work here ("trivial" meaning, here, conditions along the lines of "$a$ is the difference between $m^2$ and another square"). I guess it would depend on what you would consider to be trivial, though. – Brian Tung May 04 '23 at 16:45
  • Questions about integer inequalities are not necessarily problems in number theory. Please don't continue to add the number theory tag. – Bill Dubuque May 04 '23 at 16:46
  • @BillDubuque: The question is about non-square numbers. It proposes a criterion (in the form of an inequality) of when a particular non-square number $m^2 - a$ satisfies that criterion. I am of the opinion that number theory will play an important part here, especially since I know the multiplicative form of $a$. – Jose Arnaldo Bebita Dris May 04 '23 at 16:49
  • 2
    As written you say nothing about the "multiplicative form of $a$" so there is no reason to believe the problem involves any nontrivial number theory. In any case it is at most an elementary number theory problem so as a compromise I will leave it at that for the time being. – Bill Dubuque May 04 '23 at 16:56
  • 2
    The [number-theory] tag is objectively wrong here. Just click on the tag to read the tag description. – Brian Moehring May 04 '23 at 17:09
  • 2
    The tag [tag:number-theory] is certainly incorrect. I'm on the fence about [tag:elemetnary-number-theory]. Please do not edit the tags again. Please also try to retain a civil tone. – Xander Henderson May 04 '23 at 17:16
  • 2
    Please do not keep bumping the question with (trivial) edits. $16$ edits in $9$ hours is too much - it takes away front page exposure from other questions instead of fairly sharing such. You can use the meta sandbox to coalesce any edits (this was one of the primary design goals when I created it). – Bill Dubuque May 05 '23 at 00:26
  • 1
    @Jose There are many elementary results of algebra-precalculus and elementary-number-theory that are (often) used in more advanced problems. But that does mean that questions about these elementary results should be tagged with more advanced tags. – Bill Dubuque May 05 '23 at 17:32
  • 1
    Why does it matter if it is a Diophantine equation? – Xander Henderson May 05 '23 at 17:47
  • 4
    Please retain a civil tone. Yes. But both the [tag:elementary-number-theory] tag and the [tag:number-theory] tags make reference to Diophantine equations. So the fact that something relates to Diophantine equations does not, a priori imply that it should be tagged with [tag:number-theory]. This tag is reserved for more advanced topics in the field, and this question does not seem to fit that mold. – Xander Henderson May 05 '23 at 17:54
  • 1
    I'm sorry, but this is absolutely bizarre. Instead of considering the possibility that your code is bad, you assume there's a bug in the server's handling of your code? It's possible you were intending for the server to display output as it was generated, while the server seems to write output internally and only show it at the end of execution, but that would still be a user error, not a server-side error. Then rough estimates show at a minimum it'll take $10^{20}$ cycles and $10^{21}$ bytes. I don't know any server that allows you that much time or allows you that much space. – Brian Moehring May 05 '23 at 21:30
  • Thank you for your time and attention, @BrianMoehring. Rest assured that I started running the Pari-GP script at a lower range (IIRC, I believe that I started from $[1,1000]$ and then worked gradually upwards.) By the way, why do you think my code is "bad", if it works for $[1,123]$? – Jose Arnaldo Bebita Dris May 05 '23 at 21:42
  • Additionally, I do know (beforehand) that the server would display the output after the script is done running. I did not realize that there were too many. =( – Jose Arnaldo Bebita Dris May 05 '23 at 21:44
  • 1
    I don't even know what you mean by "works for $[1,123]$". If you meant for $x,y$ both in $[1,123]$, then you should have found a lot of counterexamples to your initial claim (a vast majority of the inputs that satisfy $y \geq 2x$ are counterexamples). Here, for instance, is some code that shows how ubiquitous the counterexamples are, and it should finish running and output the display in under 30 seconds. – Brian Moehring May 05 '23 at 21:54
  • 1
    Note that in my code, we start at $y=2x$ because then we don't need to continuously check whether $x^2 - y < (x-1)^2$ (which is algebraically equivalent to $y > 2x-1$) and it ends at or before $y=x^2$ (so we don't keep checking whether negative numbers are square or not when $x$ is small). Also, we start at $x=2$ and end at a small enough $x$ so that the time/space requirements of the code are within reason. – Brian Moehring May 05 '23 at 21:57
  • Like I said, I started running the script for the range $[1,1000]$. (Note that it was Prem who ran my script for $[1,123]$.) In the aftermath, I did realize my mistake. – Jose Arnaldo Bebita Dris May 05 '23 at 22:15
  • 1
    "Mind if I include a link to your code in a further edit to this question" -- Sure. I say "my code" only to differentiate it from the code you had posted, but I don't claim any ownership of it. If you want it to be included indefinitely in the question, you should post it there, as the comments are highly likely to be moved to chat at some point. – Brian Moehring May 05 '23 at 22:21
  • Okay, thank you for giving your consent, Brian. I have just tried running your script on the range $m \in [2,1000]$, so I think it is not a problem with my code. (I am not expert on determining computer time/space requirements for running scripts in Sage Cell Server, so I will have to defer to your opinion.) – Jose Arnaldo Bebita Dris May 05 '23 at 22:27
  • 1
    Code is designed to run with appropriately sized parameters. It is precisely a problem with the code, or at least your implementation of the code, if you intend to run it with larger parameters than it is able to handle. – Brian Moehring May 05 '23 at 22:35
  • 2
    The only solution to $m^2-p^k=n^2$ with $\gcd(m,p)=1$ is $m=(p^k+1)/2$, $n=(p^k-1)/2$. This holds as long as $p$ is an odd prime; it doesn't need any assumptions on $p\bmod4$ or $k\bmod4$ or perfection of $p^km^2$. – Gerry Myerson May 05 '23 at 23:33
  • Thank you for that information, @GerryMyerson! We are already aware of that. (See: 1, 2.) – Jose Arnaldo Bebita Dris May 06 '23 at 00:13

1 Answers1

1

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.

mathlove
  • 151,597