Find the largest prime $p$ such that there exist positive integers $a,b$ satisfying $$p=\frac{b}{2}\sqrt{\frac{a-b}{a+b}}.$$
Problem
Source: Swiss TST 2019 P2
Tags: number theory, prime numbers
matinyousefi
12.05.2020 16:31
Looks very similar to Iran 1997.
Kimchiks926
13.05.2020 11:17
$(p;a;b) = (5;39;15)$
Assume that $p$ is odd prime. Original equation is equivalent to:
$$4p^2(a+b) = b^2(a-b) \implies b(b^2+4p^2) = a(b^2 - 4p^2) \implies \frac{8p^2b}{b^2-4p^2}=a-b$$Denote $a-b=l$, then:
$$lb^2 -8p^2b-4p^2l=0$$Consider this as equation as quadratic equation respect to variable $b$. Discriminant of this equation is:
$$64p^4+ 16p^2l^2 = 16p^2( 4p^2 + l^2)$$We conclude that $4p^2+l^2$ is a perfect square. Note that:
$$4p^2+l^2 = \Delta^2 \implies 4p^2 = (\Delta - l)(\Delta + l) $$Let $\Delta - l = x$ and $\Delta + l = y$. Note that $y-x=2l$ and $ (x,y)= (1;4p^2); (2;2p);(4;p^2); (p;4p);( 2p;2p);(1;4p);(4;p^2)( 2;2p^2); (1;4p^2)$. This implies that $l=p-1$ or $l=p^2 - 1$. It easy to check that $l=p-1$ fails.
Note that:
$$ 4p^2 + (p^2 - 1)^2 = ( p^2 + 1)^2 = \Delta^2$$Therefore:
$$b = \frac{8p^2 \pm4p (p^2+1)}{2(p^2-1)}=\frac{4p^2\pm 2p(p^2+1}{p^2 -1)}$$Note that:
$$b = \frac{ 4p^2+2p^3+2p}{p^2-1} = 2p+4 + \frac{4}{p-1}$$This gives us $p=5$ or $p=3$.
If $b = \frac{ 4p^2-2p^3-2p}{p^2-1}$, then $b$ is not positive integer, which is contradiction