TITLE: Find ALL integer solutions (n,m) of the equation $(n+1)(2n+1)=10m^2$
QUESTION [6 upvotes]: What I'm thinking is that since RHS contains a $10$, so at least one of the factors $(n+1)$ OR $(2n+1)$ must be divisible by 2. $(2n+1)$ is out of the question, so that means $(n+1)$ must be even, or $n$ must be odd.
If $(n+1)$ is divisible by $5$ also, then :
$n+1 = 5k_1 = 2k_2$ (for some ($k_1,k_2\in {\mathbb Z}$))
I do not know what to do with that $m^2$ .
Can anyone tell me how to proceed ?
EDIT : I found a factorized equivalent for the given statement : $(n+3m)(n-3m) + (n-m)(n+m) + (3n + 1) =0 $ . Is it something useful ?

REPLY [2 votes]: I got this. We have $(n+1)(2n+1)=2n^2+3n+1=10m^2$, if we multiply last equation by $8$ we get $16n^2+24n+8=80m^2$, but we can write this equation as $$(4n+3)^2-1=80m^2.$$
So if we set $4n+3=x$ we get the Pell-equation $x^2-80m^2=1$. The fundamental solution of this equation is $x=9$ and $m=1$, hence we have the following recursive formulas $$x_{r+1}=9x_r+80m_r,$$ $$m_{r+1}=x_r+9m_r,$$ where $r\in\Bbb{N}$. Therefore $$n=\frac{9x_r+80m_r-3}{4}=\frac{9x_r-3}{4}+20m_r.$$
This means that in order to have $n\in\Bbb{Z}$ we must have $9x_r\equiv 3\pmod 4$, equivalently $x_r\equiv 3\pmod 4$. Now, from $x_{r+1}=9x_r+80m_r$ it's easy to prove by induction that $x_r\equiv 1\pmod4$ for every $r\in\Bbb{N}$, so $-x_r\equiv 3\pmod 4$ and this lead us to infinitely many solutions, i.e. for every $x_r$ which is a solution of $x^2-80m^2=1$, we just need to take $-x_r$ in order to have $n\in\Bbb{Z}$. Hence all the solutions are $$(n,m)=\Bigl(\frac{-x_r-3}{4}, \pm m_r\Bigr).$$