Let $p$ be an odd prime. Find all positive integers $n$ for which $\sqrt{n^2-np}$ is a positive integer.
Problem
Source: Baltic Way 2018, Problem 16
Tags: number theory, prime numbers
06.11.2018 12:01
This exact question was in 1997 Spainish Mathematical Olympiad. The answer is $n=\frac{(p+1)^2}{4}$ where $p\neq 2$ For $p=2$, $(n-1)^2>n^2-2n>(n-2)^2$ Now, $n^2-np=(n)(n-p)$. We then have two cases: Case 1: $n\equiv 0 \pmod{p}$ Then, let $n=p^a.k$ where $p\nmid k$ So we must have, $\sqrt{n^2-np}=p\sqrt{(p^{a-1}.k)(p^{a-1}.k-1)}$ Thus, $p^{a-1}.k=a^2, p^{a-1}.k-1=b^2$ This system has no solutions in positive integers. Case 2: $n\not\equiv 0 \pmod{p}$ In that case $n\perp n-p$. So, $n=a^2, n-p=b^2$ $\implies a^2-b^2=p\implies a=b+1, a+b=2b+1=p$ $\implies a=\frac{p+1}{2}\implies \boxed{n=a^2=\frac{(p+1)^2}{4}}$
15.08.2019 20:14
Poland 2017, Round 2, P1 wrote: Prove that for each prime $p>2$ there exists exactly one positive integer $n$, such that $n^2+np$ is a perfect square.
03.04.2020 23:14
Here is cool and quick solution. Let $\sqrt{n^2-np}=m$, now square this equation $n^2-np-m^2=0$, using quadratic formula for $n$, we get that $n=\frac{p \pm \sqrt{p^2+4m^2}}{2}$ Now, $p^2+4m^2$ has to be square of some number, so $p^2+4m^2=q^2$, and $n=\frac{p+q}{2}$, since $q > p$ And now, $p^2=q^2-4m^2=(q-2m)(q+2m)$, since $p$ is prime number $\implies q+2m=p^2$ and $q-2m=1$ Adding these equations you will get $2q=p^2+1$, or $q=\frac{p^2+1}{2}$ Now, let us put this in previous equation: $n=\frac{p+\frac{p^2+1}{2}}{2}=\frac{p^2+2p+1}{4}=\frac{(p+1)^2}{4}=(\frac{p+1}{2})^2$ And that is all $Q.E.D.$
04.04.2020 16:23
Source : Chinese Mathematics Competition (2004) Hainan . Problem number 10