Natural numbers $a$ and $b$ are given such that the number $$ P = \frac{[a, b]}{a + 1} + \frac{[a, b]}{b + 1} $$Is a prime. Prove that $4P + 5$ is the square of a natural number.
Problem
Source: 239 2009 S4
Tags: number theory
Magikarp1
30.07.2020 04:58
Let $d = \gcd(a, b), a = dm,$ and $b = dn$. Notice that $\gcd(m,n) = 1$. The equation becomes $P(dm + 1)(dn + 1) = dmn(dm + dn + 2)$.
Since $\gcd(d, dm+1) = \gcd(d, dn+1) = 1$, we must have $d | P$. Thus either $d = 1$ or $d$ is a prime.
Suppose $d$ is a prime $p$. Then the equation becomes $(pm + 1)(pn + 1) = mn(pm + pn + 2)$.
Since $\gcd(m, pm+1) = 1, m | pn+1$ and similarly $n | pm + 1$.
Let $pn + 1 = km$ and $pm + 1 = ln$. Solving for $m$ and $n$, we get $m = \frac{p + l}{kl - p^2}$ and $n = \frac{p + k}{kl - p^2}$.
We now have $kl = pm + pn + 2 = \frac{2kl + pk + pl}{kl - p^2} \implies kl(kl - p^2) = 2kl + pk + pl$. Thus, $k | pl$ and $l | pk$.
If $p | k$, then $p | km = pn + 1 \implies p = 1$, which is a contradiction, so $p \not| k$. Similarly, we have $p \not| l$
Therefore, $k | l$ and $l | k \implies k = l \implies m = n$. Since $\gcd(m,n) = 1, m = n = 1$.
We then have $p^2 + 2p + 1 = 2p + 2 \implies p^2 = 1$. However, no prime satisfies this equation.
Now suppose $d = 1$. Then the equation is $p(m+1)(n+1) = mn(m + n + 2)$.
If $m = n = 1$, then $p = 1$ which does not work, so WLOG let $m > n$.
$2n(m + n + 2) = 2nm + 2n^2 + 4n > mn + m + n + 1$, so $p > \frac{m}{2} > \frac{n}{2}$.
$p$ must be a factor of $m$, $n$, or $m + n + 2$.
If $p | m + n + 2$, then $m | (m+1)(n+1)$. $\gcd(m,m+1) = 1$, so $m | n+1$. Since $m > n$, we must have $m = n+1$.
Similarly, $n | m + 1 = n + 2$, so $n = 1$ or $2$. This leads to $p = \frac 53$ or $\frac 72$, both of which do not work.
If $p | n$, since $p > \frac n2$, $p = n \implies (m+1)(p+1) = m(m + p + 2) \implies p = m^2 + m - 1 > m > n = p$. This is a contradiction.
If $p | m$, then $p = m \implies (n+1)(p + 1) = n(n + p + 2) \implies p = n^2 + n - 1$.
Thus the only solutions are of the form $p = n^2 + n -1$. $4p + 5 = 4n^2 + 4n + 1 = (2n+1)^2$, so we are done.