1

Find $(p,x,y)$, where $p$ is prime and $x,y$ natural numbers, such that:

$p+1=2x^2$

$p^2+1=2y^2$

A solution to this problem is $(7,2,5)$ and I tried to show that it is the only one, but I didn't get far. Can anyone help?

  • For the users who voted to close the question: I fear that the question linked contains answers that are by no means elementary — in contrast to the ones offered here —. Although it is always nice to see how these kind of problems are related to Pell-like equations or to Catalan's Conjecture, it is honestly overkill to use these tools when you can solve the problem using elementary techniques... – Dr. Mathva Dec 15 '20 at 20:58
  • Why don't you add your answer to the duplicate instead? – Toby Mak Dec 16 '20 at 06:12

2 Answers2

3

First of all, rule out $p\in\mathbb \{2,3\}$. Hence, $2\mid p-1$. Then, observe that your equations yield $$p\cdot \frac{p-1}2=(y-x)(y+x)$$ We could have $p\mid y-x$, but since $p>\frac{p-1}2$, this would imply that $y-x>y+x$. Contradiction. Thus, we have $p\mid x+y\implies p\leqslant x+y\implies 2p\leqslant 2(x+y)$. At the same time, we infer that $p-1\geqslant 2(y-x)$.

Add these inequalities to obtain $4x\geqslant p+1\iff 4x\geqslant 2x^2\iff x\in\mathbb \{0,1,2\}$. It is easy to see that $(x,y,p)\equiv (2,5,7)$ is the only solution.

Dr. Mathva
  • 8,621
-1

From $p+1=2x^2, p^2+1=2y^2$ we have that $$p(p-1)=2(y-x)(y+x).$$ Since $p$ is prime it is $y-x=1$ or $y+x=p.$

  • If $y-x=1$ then $p=3$ and there is no solution.
  • If $y+x=p$ then $p+1=4x=2x^2\implies x=2.$ And thus $y=5,p=7.$
mfl
  • 29,399
  • How do you show that $p(p-1)=2(y-x)(y+x)$ implies that $y-x=1$ or $y+x=p$? – Dr. Mathva Dec 15 '20 at 17:13
  • $p$ is prime. So $p$ must be equal to one of the factors (in case they are bigger than one). – mfl Dec 15 '20 at 17:19
  • No. The LHS is $p(p-1).$ And $p-1< p.$ If $p$ divides $2$ then $p-1=1.$ If $p$ divides $y-x$ then the equality is not possible ($p-1\ge 2 (y+x)>p$). – mfl Dec 15 '20 at 17:24
  • Exactly, but the only thing you can conclude is that $p\mid x+y$, which does not necessarily imply $p=x+y$... – Dr. Mathva Dec 15 '20 at 17:25
  • If $y+x=kp$ then $p(p-1)=2(y-x)(y+x)\implies p-1=2k(y-x)$ from where $k(y+x)=2k(y-2x)+1.$ Thus $k=1$ and we are done. – mfl Dec 15 '20 at 17:41
  • Exactly :) But this should belong to your answer and not the fifth comment, where less users will see it. I'll be glad to upvote your answer after the edit ;) – Dr. Mathva Dec 15 '20 at 17:48
  • Is the solution correct or not? So, one (or several) upvote or downvote changes nothing. – mfl Dec 15 '20 at 18:59