Determine all triples $(x,y,p)$ of positive integers such that $p$ is prime, $p=x^2+1$ and $2p^2=y^2+1$.
Problem
Source: Rioplatense L3 2023 #1
Tags: number theory
07.12.2023 02:11
Factor over $\mathbb Z[i]$ to get $p=(x+i)(x-i)$ so that $(1+i)(1-i)(x+i)^2(x-i)^2=(y+i)(y-i)$. Thus, since $\mathbb Z[i]$ has unique factorization and $x\pm i$ and $1\pm i$ are prime, $y\pm i$ must be either $(1+i)(x+i)^2$, $(1+i)(x+i)(x-i)$, or $(1+i)(x-i)^2$. It is impossible for $y\pm i=(1+i)(x+i)(x-i)$ because the imaginary part is divisible by $p$. In the first case, we have $(1+i)(x+i)^2=x^2-1+2ix+ix^2-i-2x$, so $2x+x^2-1=\pm 1$ The only integer solutions for $x$ are $0$, and $-2$, which are not positive. In the last case, we have $(1+i)(x-i)^2=x^2-1-2ix+ix^2-i+2x$, so $-2x+x^2-1=\pm 1$. The only integer solutions are $2$ and $0$, and only $2$ is positive. So the only solution is $x=2$, $p=2^2+1=5$, and $y=\sqrt{2\cdot 5^2-1}=7$. $x$, $y$, and $z$ are positive integers and $p$ is prime, so the only solution is $(2,7,5)$.
08.12.2023 04:58
mathisreal wrote: Determine all triples $(x,y,p)$ of positive integers such that $p$ is prime, $p=x^2+1$ and $2p^2=y^2+1$. $\color{blue}\boxed{\textbf{Answer: (2,7,5)}}$ $\color{blue}\boxed{\textbf{Proof:}}$ $\color{blue}\rule{24cm}{0.3pt}$ $$p=x^2+1...(\alpha)$$$$2p^2=y^2+1...(\beta)$$$$\Rightarrow y>x$$$(\alpha)$ in $(\beta):$ $$\Rightarrow2(x^2+1)^2=y^2+1$$$$\Rightarrow 2x^4+4x^2+1=y^2$$$$\Rightarrow (x^2+1)(2x^2+1)=(y-x)(y+x)$$By $(\alpha):$ $$\Rightarrow p(2x^2+1)=(y-x)(y+x)...(\theta)$$$\color{red}\boxed{\text{If } p|y-x :}$ $\color{red}\rule{24cm}{0.3pt}$ $$y-x=pk, k\in\mathbb{Z}^+$$In $(\theta):$ $$\Rightarrow 2x^2+1=k(pk+2x)$$$$\Rightarrow 2x^2+1=pk^2+2xk$$By $(\alpha):$ $$\Rightarrow 2x^2+1=x^2k^2+k^2+2xk$$$$\Rightarrow k\leq 1\Rightarrow k=1$$$$\Rightarrow 2x^2+1=x^2+1+2x$$$$\Rightarrow x^2=2x$$$$\Rightarrow x=2$$$$\Rightarrow p=2^2+1=5 \Rightarrow y-2=5(1)\Rightarrow y=7$$$$\Rightarrow (x,y,p)=(2,7,5) \text{ is a solution}$$$\color{red}\rule{24cm}{0.3pt}$ $\color{red}\boxed{\text{If } p|x+y :}$ $\color{red}\rule{24cm}{0.3pt}$ $$x+y=pk, k\in\mathbb{Z}^+$$In $(\theta):$ $$\Rightarrow 2x^2+1=k(pk-2x)$$$$\Rightarrow 2x^2+1=pk^2-2xk$$By $(\alpha):$ $$\Rightarrow 2x^2+1=x^2k^2+k^2-2xk$$$$\Rightarrow 3x^2+1=x^2k^2+(k-x)^2$$$$\Rightarrow 1=x^2(k^2-3)+(k-x)^2$$If $k\geq 2: \Rightarrow 1\geq x^2+(k-x)^2 \Rightarrow x=k=1(\Rightarrow \Leftarrow)$ $$\Rightarrow k=1$$$$\Rightarrow 1=-2x^2+x^2-2x+1$$$$\Rightarrow x^2=-2x(\Rightarrow \Leftarrow)$$$\color{red}\rule{24cm}{0.3pt}$ $$\Rightarrow \boxed{(x,y,p)=(2,7,5) \text{ is the only solution}}_\blacksquare$$$\color{blue}\rule{24cm}{0.3pt}$
08.12.2023 18:34
Here is a shorter version of the solution in #3: Clearly $p \ge 3$ and $2p>y>p>x$ and $x$ is even, $y$ is odd. Note that $y^2 \equiv -1 \equiv x^2 \pmod{p}$, hence $y=\pm x+kp$ for some odd positive integer $k$. But $p<y<2p$, hence the only possibility is $y=x+p=p+\sqrt{p-1}$. But now just plug in to find $2p^2=(p+\sqrt{p-1})^2+1=p^2+p+2p\sqrt{p-1}$ and hence $p-1=2\sqrt{p-1}$ and hence $p=5$, leaving us with $x=2, y=7$.