My grandad gave me a challenge and, like any non-cheating child, I wrote a program to solve it for me
It goes like this: $48$ is a peculiar number, because
- $48+1$ is square, and
- $\frac{48}{2}+1$ is square.
Find the next $3$ smallest examples of numbers $X$ that follow both of those rules.
- $X+1$ is square
- $\frac{X}{2}+1$ is square.
I wrote some code and ran it and got quite a few large examples, even so high as $16$ digits.
But then, after a while, I stopped finding new numbers. It is likely that my computer/my coding skills just can't take it high enough in a small time frame, but my math brain is itching.
Will this stop or will this pattern go on forever.
Why?
Let $x=2n$. Then we are told that $n=m^2-1$ and $2n=M^2-1$ for suitable natural numbers $m,M$. It follows that $$2m^2-2=M^2-1\implies 2m^2=M^2+1$$ or $$\boxed { M^2-2m^2=-1}$$
This is one instance of the classical Pell's Equation. And the solution is well documented online.