Let $m,n \in N$ such that $2m^2+m=3n^2+n$, Find all integral solution of $2m^2+m=3n^2+n$

elementary-number-theorynumber theoryprime numbers

let $m,n \in N$ such that $2m^2+m=3n^2+n$. Find all integral solution of $2m^2+m=3n^2+n$ ?

My work:

$$2m^2-2n^2+m-n=n^2$$

$$\implies 2(m-n)(m+n)+(m-n)=n^2$$

$$\implies(2m+2n+1)(m-n)=n^2$$

Case $1$

$2m+2n+1=n^2$ and $m-n=1$

Now putting $m=n+1$ in $2m+2n+1=n^2$

which lead me to $2(n+1)+2n+1=n^2$

$$\implies n^2-4n-3=0$$

above equation give me irrational roots.

Case 2

$2m+2n+1=n$ and $m-n=n$

Now putting $m=2n$ in $2m+2n+1=n$

which leads me to $2(2n)+2n+1=n$

$\implies n=\frac{-1}{5}$

which is not a natural number.

I am not getting any solution to the given equations. Is my approach correct?

Also is it necessary that $(m-n)$ and $(2m+2n+1)$ must be prefect square

Please Suggest a solution without using Modular Arithmetic

Best Answer

$$\begin{align*} 2m^2+m&=3n^2+n \\ \frac{1}{8}\left((4m+1)^2-1\right)&=\frac{1}{12}\left((6n+1)^2-1\right)\\ 3(4m+1)^2-3&=2(6n+1)^2-2 \end{align*}$$ Let $x=(4m+1)^2$ and $y=(6n+1)^2$, we have, $$3x^2-2y^2=1$$ The above equation has been solved here

The general solution is obtained from the recurrences, $$x_{n+1}=5x_n+4y_n,\;y_{n+1}=6x_n+5y_n,\;(x_1,y_1)=(1,1). $$