Maths Olympiad Prep

Library / /34 of 82

Number theory Difficulty 5.4 AIME, harder Prove it Croatia

For a given prime number pp determine all integers nn such that n2+pn\sqrt{n^2 + pn} is an integer.

Solution

Let n2+pn=m\sqrt{n^2 + pn} = m, mN0m \in \mathbb{N}_0. Then n2+pnm2=0n^2 + pn - m^2 = 0.
The solutions of this quadratic equation are
n=12(p±p2+4m2). n = \frac{1}{2} \left( -p \pm \sqrt{p^2 + 4m^2} \right).
The solutions are integers, so p2+4m2=w2p^2 + 4m^2 = w^2, for some wN0w \in \mathbb{N}_0.
Since w+2m0w + 2m \ge 0 and w+2mw2mw + 2m \ge w - 2m, from p2=(w2m)(w+2m)p^2 = (w - 2m)(w + 2m), we obtain the following possibilities:
{w2m=1w+2m=p2or{w2m=pw+2m=p \begin{cases} w - 2m = 1 \\ w + 2m = p^2 \end{cases} \quad \text{or} \quad \begin{cases} w - 2m = p \\ w + 2m = p \end{cases}
In the first case we obtain w=p2+12w = \frac{p^2 + 1}{2}, m=p214m = \frac{p^2 - 1}{4}, so it follows:
n=12(p±p2+4(p214)2)n1=(p12)2,n2=(p+12)2. \begin{aligned} n &= \frac{1}{2} \left( -p \pm \sqrt{p^2 + 4 \left( \frac{p^2 - 1}{4} \right)^2} \right) \\ n_1 &= \left( \frac{p-1}{2} \right)^2, \quad n_2 = -\left( \frac{p+1}{2} \right)^2. \end{aligned}
These numbers are integers only when pp is odd, i.e. only if p>2p > 2.

In the second case we obtain w=pw = p, m=0m = 0, so it follows that n=12(p±p)n = \frac{1}{2}(-p \pm p) or n3=0n_3 = 0 and n4=pn_4 = -p.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.