Determine all pairs $(p,q)$ of prime numbers with the following property: There are positive integers $a,b,c$ satisfying \[\frac{p}{a}+\frac{p}{b}+\frac{p}{c}=1 \quad \text{and} \quad \frac{a}{p}+\frac{b}{p}+\frac{c}{p}=q+1.\]
Problem
Source: Polish MO Finals P3 2024
Tags: number theory, number theory proposed, prime numbers, system of equations, Diophantine equation
04.04.2024 21:00
21.08.2024 01:18
Answer: $(p,q)=\boxed{(2,13),(3,17)}$ If two of $a$, $b$, and $c$ are multiples of $p$ then all three are so we have a few cases to check, all of which fail. Let $s=ab+bc+ca$. Then the conditions give $a+b+c=p(q+1)$ and $abc=sp$. Thus $a$, $b$, and $c$ are the roots of the cubic $$x^3-p(q+1)x^2+sx-sp=0$$Choose a root $x$ that is not a multiple of $p$. Then we have $x(x^2+s)=p((q+1)x^2+s)$. Then $x|s$ so let $s=xs'$. Then $x(x+s')=p((q+1)x+s')$. Again let $s'=xs''$ giving $x(1+s'')=p((q+1)+s'')\iff (x-p)(1+s'')=pq$. Thus $x-p|q$. Thus two of $a$, $b$, and $c$ must be $p+1$ and $p+q$ and let the other be $k$. Then the second equation gives $k=pq-p-q-1$ so we must have $$\frac{p}{p+1}+\frac{p}{p+q}+\frac{p}{pq-p-q-1}=1$$Computing from right to left (not that bad) gives that $$2pq+q^2+q+p^3q=pq^2\Rightarrow p^3+2p+1=(p-1)q$$. This gives $$p^2+p+3+\frac{4}{p-1}=q$$Thus $p-1|4$ so checking cases gives only $p=2$ and $p=3$ work.