a) Find all prime numbers $p, q, r$ satisfying $3 \nmid p+q+r$ and $p+q+r$ and $pq+qr+rp+3$ are both perfect squares. b) Do there exist prime numbers $p, q, r$ such that $3 \mid p+q+r$ and $p+q+r$ and $pq+qr+rp+3$ are both perfect squares?
Problem
Source: Turkey JBMO Team Selection Test 2013, P2
Tags: modular arithmetic, number theory, prime numbers, number theory proposed
01.06.2013 00:59
a) We need $p+q+r \equiv 1 \pmod{3}$. If, say, $q=r=3$, then $pq+qr+rp+3 = 6(p+2)$ forces $2\mid p+2$, hence $p=2$, which does not work. If neither $p,q,r$ is $3$, we need, say, $p, q \equiv 1 \pmod{3}$ and $r \equiv -1 \pmod{3}$, but then $pq+qr+rp+3 \equiv -1 \pmod{3}$, so no solution. If, say, $r=3$, and the other two are odd, then we need $p+q \equiv 2 \pmod{4}$, so $p \equiv q \equiv \pm 1 \pmod{4}$, but then $pq+qr+rp+3 \equiv 2 \pmod{4}$, so no solution; thus we need, say $q=2$, and then $pq+qr+rp+3 = 5p + 9 = m^2$ yields $5p=(m-3)(m+3)$, with only possibility $p=11$, which works. Thus, the only solution is $\{p,q,r\} = \{2,3,11\}$. b) $p=q=r=3$ does not work. If, say, $r=3$, we need $p \equiv -q \equiv \pm 1 \pmod{3}$, but then $pq+qr+rp+3 \equiv -1 \pmod{3}$, so no solution. If neither is $3$, and all are odd, we need either $1,1,-1$ modulo $4$, or $-1,-1,-1$ modulo $4$, but then $pq+qr+rp+3 \equiv 2 \pmod{4}$, so no solution. Thus we need some of them (but not all three) to be $2$. If, say, $q=r=2$, then $pq+qr+rp+3 = 4p + 7 \equiv -1 \pmod{4}$, so no solution. It remains the case $r=2$ and the other two odd.
01.06.2013 01:21
mavropnevma wrote: b) $p=q=r=3$ does not work. If, say, $r=3$, we need $p \equiv -q \equiv \pm 1 \pmod{3}$, but then $pq+qr+rp+3 \equiv -1 \pmod{3}$, so no solution. If neither is $3$, and all are odd, we need either $1,1,-1$ modulo $4$, or $-1,-1,-1$ modulo $4$, but then $pq+qr+rp+3 \equiv 2 \pmod{4}$, so no solution. Thus we need some of them (but not all three) to be $2$. If, say, $q=r=2$, then $pq+qr+rp+3 = 4p + 7 \equiv -1 \pmod{4}$, so no solution. It remains the case $r=2$ and the other two odd. But $(p, q, r) = (2, 11, 23)$ holds.
01.06.2013 01:47
Indeed. After we reach the last possibility, when $r=2$ and the other two are odd, we can write $p+q+r = (p+1) + (q+1) = n^2$ and $pq+qr+rp+3 = (p+1)(q+1) + (p+1) + (q+1) = m^2$, hence $(p+1)(q+1) = m^2-n^2$. This may lead to an example. But we can also write $(p+2)(q+2) = m^2+1$. To factor, take $m = 2s^2$ and use the Sophie Germain method to get $m^2+1 = (2s^2-2s+1)(2s^2+2s+1)$. Now, $s=2$ allows $\{p,q\} = \{3,11\}$, which does not work, since $3\nmid 2+3+11 = 16$ (but, by coincidence, is that unique solution of point a)). However, $s=3$ allows $\{p,q,r\} = \{11,23,2\}$, which does work, as stated in the post above. Under this particular factorization we have $3\mid p+q+r = (p+1) + (q+1) = (2s^2-2s) + (2s^2+2s) = (2s)^2$ forcing $3\mid s$, thus $s=3t$. Other solutions than the one before (for $t=1$) may then be obtained, for example $\{p,q,r\} = \{59,83,2\}$ for $t=2$, or $\{p,q,r\} = \{263,311,2\}$ for $t=4$.