# Find all pairs $(a,b)$ of positive integers satisfying $6a^2+a=b^2$.

I have already tried treating the equation as a quadratic on a and b, but it doesn't work. I also have plugged in some values. $$(6,10)$$ is a solution, but I didn't manage to find any other. Are there any general methods to solve equations like this one? Namely $$Ax^2+Bx+Cy^2+Dy+E=0$$ for integers x and y.

• Use the fact that $a$ and $6a+1$ are coprime. Hence $a=n^2, \ 6a+1=m^2$ and $nm=b$
– RFZ
Commented Apr 16, 2022 at 19:45
• For example, $a=400$, $b=980$ is a solution. Commented Apr 16, 2022 at 19:45
• @ZFR that nice idea leads to the Pell equation $m^2-6n^2=1$ which ends up similar to my posted solution. Commented Apr 16, 2022 at 19:48
• @GregMartin, I did not notice your answer. Sorry! I'll take a look.
– RFZ
Commented Apr 16, 2022 at 19:48
• no worries, your comment won by 1 minute :) Commented Apr 16, 2022 at 19:50

The equation is equivalent to $$144a^2+24a=24b^2$$, and thus to $$(12a+1)^2-24b^2=1$$, which is a special case of a Pell equation $$x^2-24b^2=1$$ where we want only the solutions with $$x\equiv1\pmod{12}$$. The trivial solution $$(x,b)=(1,0)$$ corresponds to $$(a,b)=(1,0)$$; the fundamental solution $$(x,b)=(49,10)$$ corresponds to the solution $$(a,b)=(4,10)$$ (not $$(6,10)$$); and infinitely many solutions can be found by calculating $$(49+10\sqrt{24})^n = x_n + y_n\sqrt{24}$$. For example, with $$n=2$$, we get the solution $$(x_2,y_2) = (4801,980)$$, corresponding to the solution $$(a,b)=(400,980)$$.

• I like to throw in $b_{n+2} = 98 b_{n+1} - b_n$ and $a_{n+2} = 98 a_{n+1} - a_n + 8$ Commented Apr 16, 2022 at 22:08

You may solve the equation for a:

$$a=\frac{-1\pm\sqrt{1+24 b^2}}{12}$$

$$\Delta=1+24b^2=c^2$$

and you get Pell equation:

$$c^2-24b^2=1$$

Which its solution is well expressed in other answer. You can also do this:

Let $$b=a+t$$, putting in equation you get:

$$5a^2+(1-2t)a-t^2=0$$

solve this for a:

$$a=\frac{-(1-2t)\pm \sqrt{24t^2-4t+1}}{10}$$

$$\Delta=24t^2-4t+1=k^2$$

Or: $$k^2-24t^2=1-4t$$

which is a pell like equation and has infinite solutions and gives rational and integer solution for t, a and b, for example:

$$\begin{cases}k-1=4t\\k+1=6t-1\end{cases}$$

One solution is $$(t, a, b)=(\frac 32, \frac 9{10}, \frac {24}{10} )$$

another solution is $$(t, a, b)=(580, 400, 980)$$.