How to find all natural $x$ for that $x^2 + (x+1)^2$ is a perfect square?
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.
Here's how it works:
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Suppose $x^2 + (x+1)^2 = y^2$. We can rewrite it as $(2x+1)^2 + 1 = 2y^2$ or $(2x+1)^2 - 2y^2 = -1$.
If $z=2x+1$ then we have $z^2 - 2y^2 = -1$. This is Pell's equation. Wikipedia article shows how to solve it.