The prime number $p > 2$ and the integer $n$ are given. Prove that the number $pn^2$ has no more than one divisor $d$ for which $n^2+d$ is the square of the natural number. .
Problem
Source: Ukraine TST 2018 p7
Tags: Perfect Square, number theory, prime, divisor
29.04.2020 09:19
We divide into 2 cases $\underline{CASE I:}$ $n$ is not divisible by $p$ Now suppose $n^2+x=k_1^2$ for some $x$ and $k_1$ where $x$ is a divisor of $n$. We claim that $x=pd_1^2$ or $x=d_1^2$ for some $d_1$, indeed, consider any prime factor $q\neq p$ of $x$, since $x|n$ we have $p|n$, therefore, since the valuation of $p$ of $n^2$ and $k_1^2$ is even and nonzero, we must also have that the valuation of $p$ of $x$ is even, therefore, we have either $x=d_1^2$ or $x=pd_1^2$. So our claim is proved. In the former case, dividing both sides by $d_1^2$, we have $$(\frac{n}{d_1})^2+1=(\frac{k_1}{d_1})^2$$but this implies $\frac{n}{d_1}=0$, contradiction. So we must have $x=pd_1^2$, now divide both sides by $d_1$, we have $$(\frac{n}{d_1})^2+p=(\frac{k_1}{d_1})^2$$However, the only solution to $a^2+p=b^2$ is $(a,b)=(\frac{p-1}{2},\frac{p+1}{2})$, hence there is an unique $d_1$ which satisfy the equation, which is exactly what we want to prove. $\underline{CASE II:}$ $n$ is divisible by $p$. Using the same notation. Using the fact that $2|v_p(x)$ and similar argument as in case $i$ we must have $x=d_1^2$, we proceed exactly the same way to yield a contradiction.
11.08.2020 21:23
We use Zsigmondy's theorem. Suppose $d \mid pn^2$ and $d=a^2-n^2$ for some positive integer $a>n$. This means $a^2-n^2 \mid pn^2$ which implies $a^2-n^2 \mid pa^2$. Let $$K(a-n)(a+n)=pa^2.$$Now, if $a+n$ has a prime factor $q$ other than $p$ which doesn't divide $a-n$, then $q \nmid a^2$, but this is impossible. Therefore, there are no such primes $q$. By Zsigmondy, this implies that either $a+n=2^j$ for some $j$ (but then analysing $\nu_2$ of the left hand side and the right hand side we obtain a contradiction , i.e. we get that the left hand side has bigger $\nu_2$), or $a+n=p^j$ for some $j$, i.e. $K(p^j-2n)p^j=p(p^j-n)^2$. In this case, since $\nu_p(n)=\nu_p(p^j-2n)=\nu_p(p^j-n)$, we get that $\nu_p(p^j-n)=j-1$, which means $n=xp^{j-1}$ for some $x<p/2$. Now if $x$ satisfies the condition, then $p-2x \mid (p-x)^2 \implies p-2x \mid p \implies x=\frac{p-1}{2}$. Therefore, there exists at most one such $d$.
10.08.2023 13:38
I wrote $d=2ny+y^2$ and examine the cases for gcd. This shows us only solution for $(n,y)$ is $(k.\frac{p-1}{2}, k)$ for $k\in N$ and from $n,p$ is given there are only one $k$ satisfies the solution. $\square$