$pq-6$, $qr-6$ and $rp-6$ are all perfect squares. Prove that $p+q+r-9$ is also a perfect square.

431 Views Asked by At

$p$, $q$ and $r$ are distinct prime numbers such that $pq-6$, $qr-6$ and $rp-6$ are all perfect squares. Prove that $p+q+r-9$ is also a perfect square.

Now comes a part where I explain what I have tried and concluded so far. In short: nothing, except that only one prime number can be 2. In fact, finding a working example proved to be a challenge. And this is not homework, I'm too old for it.

EDIT: Actually, I turned out to be smarter than I thought. Suppose that we have three odd primes $p,q,r$. In that case at least two are equal to 1 or 3 (modulo 4). In both cases their product is equal to 1 (modulo 4). Subtract 6 and and you get 3 (modulo 4). And such number cannot be a perfect square.

So at least one prime number has to be $2$, say $p$. I solved 1/3 of the problem. Probably enough to avoid downvotes :)

4

There are 4 best solutions below

6
On BEST ANSWER

Let $p=2$ be the even prime and without loss of generality assume $p<q<r$. Since $p,q,r$ are primes this means $r\geq 5$.

We shall first show the following:

Lemma. Let $2=p<q<r$ be primes and $$ \begin{align} 2q-6 &= x^2\\ 2r-6 &= y^2\\ qr-6 &= z^2 \end{align} $$ for some integers $x,y,z\geq 0$. Then $$ z+y = r $$

Proof. Taking equations $2$ and $3$, we form the following: $$ \begin{align} z^2 &\equiv -6 \equiv y^2 \pmod r\\ (z+y)(z-y) &\equiv 0 \pmod r \end{align} $$ Therefore $r$ divides $z+y$ or $z-y$. We first assume the latter, then $$ \begin{align} z-y &\equiv 0 \pmod r\\ z &= y + kr \end{align} $$ for some $k\geq 0$ since $z> y$. But now $$ \begin{align} 0 &< y+kr=z =\sqrt{qr-6} < \sqrt{r^2} = r\\ 0 & < y+kr < r \implies k=0 \end{align} $$ This means that $$ z = y $$ which is not possible. Hence we must have instead $$ \begin{align} z+y &\equiv 0 \pmod r\\ z+y &= kr\\ 0 < kr &= z+y\\ &= \sqrt{qr-6}+\sqrt{2r-6}\\ &< \sqrt{r^2} + \sqrt{4r}\\ &= r+2\sqrt{r}\\ &< 2r\\ 0<kr &< 2r \end{align} $$ where the last equality is because $$ r\geq 5 \implies 4r < r^2 \implies 2\sqrt{r} < r $$ Therefore we must have precisely $k=1$, giving $z+y=r$.

$$ \tag*{$\square$} $$


We now show that

Proposition. Let $p=2$ and $$ \begin{align} 2r-6 &= y^2\\ qr-6 &= z^2\\ z+y &= r \end{align} $$ for some integers $q,r,y,z\geq 0$. Then $$ p+q+r-9 = (y-1)^2 $$

Proof. Using $z+y=r$, we have $$ \begin{align} r &= z+y\\ &= \sqrt{qr-6} + \sqrt{2r-6}\\ \sqrt{qr-6} &= r - \sqrt{2r-6}\\ qr-6 &= r^2-2r\sqrt{2r-6} + (2r-6)\\ qr &= r^2-2r\sqrt{2r-6} + 2r\\ q &= r -2\sqrt{2r-6} + 2\\ p+q+r-9 = q+r-7 &= (2r-5) -2\sqrt{2r-6}\\ &= (y^2+1) - 2y\\ &= (y-1)^2 \end{align} $$

$$ \tag*{$\square$} $$


Edit 1: Deriving a formula similar to Will Jagy's.

Proposition. Primes $q,r$ satisfies $$ \begin{align} q &= 2(6k\pm 1)^2+3 = 5 + 24u\\ r &= 2(6k\pm 2)^2+3 = 11 + 24v \end{align} $$ for some integers $u,v\geq 0$ (must be same sign). This in turn gives $$ \begin{align} x &= \sqrt{2q-6} = 2(6k \pm 1)\\ y &= \sqrt{2r-6} = 2(6k \pm 2)\\ z &= \sqrt{qr-6} = 72k^2\pm 36k+7\\ q+r-9 &= (3(4k\pm 1))^2 \end{align} $$

Proof. We start from $$ \begin{align} 2q-6&=x^2\implies -6\equiv x^2\pmod q\\ 2r-6&=y^2\implies -6\equiv y^2\pmod r \end{align} $$ Since $-6$ is a square, by Quadratic Reciprocity we get $q,r\equiv 1,5,7,11\pmod{24}$.

Now the third equation gives $$ qr-6 = z^2\implies qr=z^2+6 $$ Since $z^2+6\equiv 6,7,10,15,18,22\pmod{24}$, the only possible combinations of $(q,r)\pmod{24}$ are $$ (1,7),(5,11),(7,1),(11,5) $$ For $q\equiv 1,7 \pmod{24}$, we observe that $$ 2q-6 =x^2\implies 20,8\equiv x^2\pmod{24} $$ which is not possible. Therefore up to interchanging $q$ and $r$, we may assume that $$ (q,r)\equiv (5,11) \pmod{24} $$ Hence we now have $$ \begin{align} q &= 2a^2+3 = 5+24u\\ r &= 2b^2+3 = 11+24v \end{align} $$ for some integers $a,b,u,v\geq 0$. By checking $\pmod{24}$, we can show that $$ a = 6m\pm 1,\quad b = 6n\pm 2 $$ Further, using $q=r-2\sqrt{2r-6}+2$ as before: $$ \begin{align} q &= r-2\sqrt{2r-6}+2\\ 72 m^2 \pm 24 m + 5 &= 72 n^2 \pm 24 n + 5\\ 9 m^2 \pm 6 m + 1 &= 9 n^2 \pm 6 n + 1\\ (3m \pm 1)^2 &= (3n\pm 1)^2 \end{align} $$ it must be the case that $m=n=k$ and $6m\pm 1,6n\pm 2$ has the same sign. Then a direct computation gives the formula for $z$ and $p+q+r-9$.

0
On

Not a complete answer but a start:

A perfect square must equal $0$ or $1$ modulo $4$. Thus, $6+n^2$ must be $2$ or $3$ modulo $4$. These remainders after division by $4$ can be built in the following ways:

$$1\times 2\equiv 2$$ $$2\times 3\equiv 2$$ $$1\times 3\equiv 3$$

In other words, remainders of both factors must not be the same! The only option is thus, that $p,q,r$ must have remainders modulo $4$ equal to $1$, $2$ and $3$ (must be different). That in turn means, that one of them must be $q=2$. It follows that $p+q+r-9\equiv 1 \mod 4$ - a perfect square of an odd number.

Now that we know a bit more about what $p,q,r$ must be, it might be easier to proceed. Especially the fact that one of them is $2$, should help simplify matters.

The original statement is now:

$$p=3+2n^2$$ $$r=3+2l^2$$ $$pr=6+m^2$$ and $$p+r-7=x^2$$ where $p$ and $r$ are odd primes, $p=1\mod 4$, $r=3\mod 4$, and $x$ is an odd number. $n$ and $m$ must be odd and $l$ must be even, and $p+r$ turns out to be divisible by $8$.

At the end, I suspect we will need the fact that $p$ and $r$ are primes - just modular arithmetics won't be enough. Unique factorization will play a role.


Now observe the same equations modulo $3$. Perfect squares can only be equal to $0$ or $1$ modulo $3$. The $0$ case is only if they are divisible by $3$. It can easily be shown that $n$ and $l$ are not divisible by $3$ except for the trivial solution $(p,q,r)=(3,2,5)$. Thus we have

$$p,r\equiv 2 \mod 3$$ $$p-r=2(n-l)(n+l)\equiv 0\mod 6$$

0
On

Here is an infinite family, where the two numbers $p,q$ are not necessarily prime

$$ p = 2(3k+2)^2 +3 $$ $$ q = 2(3k+1)^2 +3 $$ I thought they were coprime, but not always. $\gcd(p,q) | 14,$ and both are odd, so the possible common factor is $7.$ Then, if $k \equiv 3 \pmod 7,$ both $p,q$ are multiples of $7.$ All the other rules in the question apply, though. $$ \left( 18 x^{2} + 24 x + 11 \right) \left( \frac{ 6 x + 1 }{ 14 } \right) - \left( 18 x^{2} + 12 x + 5 \right) \left( \frac{ 6 x + 5 }{ 14 } \right) = \left( -1 \right) $$

3  p : 245 =  5 7^2    q : 203 =  7 29
10  p : 2051 =  7 293    q : 1925 =  5^2 7 11
17  p : 5621 =  7 11 73    q : 5411 =  7 773
24  p : 10955 =  5 7 313    q : 10661 =  7 1523

$$ $$

$$ p = 18 k^2 + 24 k + 11 $$ $$ q = 18 k^2 + 12 k + 5 $$ $$ 2p-6 = (6k+4)^2 $$ $$ 2q-6 = (6k+2)^2 $$ $$ pq - 6 = (18k^2 + 18k + 7)^2 $$ $$ p+q-7 = ( 6k+3)^2 $$ $$ $$

Both prime, first few:

0  p : 11    q : 5
2  p : 131    q : 101
7  p : 1061    q : 971
27  p : 13781    q : 13451
42  p : 32771    q : 32261
67  p : 82421    q : 81611
137  p : 341141    q : 339491
172  p : 536651    q : 534581
287  p : 1489541    q : 1486091
317  p : 1816421    q : 1812611
447  p : 3607301    q : 3601931
487  p : 4280741    q : 4274891
497  p : 4458101    q : 4452131
552  p : 5497931    q : 5491301
597  p : 6429701    q : 6422531
632  p : 7204811    q : 7197221
662  p : 7904291    q : 7896341
772  p : 10746251    q : 10736981
1017  p : 18641621    q : 18629411
1292  p : 30077771    q : 30062261
1437  p : 37203941    q : 37186691
1497  p : 40374101    q : 40356131
1537  p : 42559541    q : 42541091
1652  p : 49163531    q : 49143701
1822  p : 59798051    q : 59776181
1827  p : 60126581    q : 60104651
1952  p : 68632331    q : 68608901
2027  p : 74005781    q : 73981451
2307  p : 95855861    q : 95828171
2377  p : 101759381    q : 101730851
2417  p : 105212021    q : 105183011
2517  p : 114095621    q : 114065411
1
On

By the work you've carried out in the edit, we may assume without loss of generality that $p=2$ and $p<q<r$. This transforms our statements to the following: given primes $q<r$ and that $2q-6,2r-6,qr-6$ are squares, show that $q+r-7$ is also a square.

Conjecture: if $2q-6=s^2$ and $2r-6=t^2$, then $t=s+2$ and $q+r-7=(s+1)^2$. Further, $\sqrt{qr-6} = \frac{q+r}{2}-1$. This seems to match with the results of Will Jagy in another answer in the thread. Unfortunately, proving this has eluded me for a while and now I must go do other things. I'll come back to this.