# only do it involve guesswork?

#### Albert

##### Well-known member
$a,y \in N$
$2a^2+a+1=y^2$
Is it possible to solve this equation systematically, or will it involve guesswork?
it seemed easy ,but....
you may check it using program (I have done this )

#### Albert

##### Well-known member
in this case the numbers of solutions will be infinite or finite ?
can we prove it ?
up to now we know :
if y odd ,a must be even
if y even ,a must be odd

Last edited:

#### Opalg

##### MHB Oldtimer
Staff member
If $2a^2 + a + 1 = y^2$ then (completing the square) $2\bigl(a+\frac14\bigr)^2 + \frac78 = y^2$. Multiply both sides by $8$ and rearrange, to get $(4a+1)^2 - 2(2y)^2 = 7.$ This is a Diophantine equation of the form $X^2 - 2Y^2 =$ const. It has infinitely many solutions, starting with the obvious ones $(a,y) = (0,\pm1)$ and $(a,y) = (1,\pm2)$. It can be solved by using the techniques for Pell's equation (we may have to call in our resident expert MarkFL at this point). You can find, for example, that if $(a,y)$ is a solution then so are $(17a+4\pm 12y,\,24a+6\pm 17y)$. That gives solutions such as $(-3,4)$, $(-8,11)$, $(16,23)$, $(45,64)$, $(552,781)$, $\ldots$.

Last edited:

#### Wilmer

##### In Memoriam
6 double solutions keeping y<100 and y=integer>0:
(y,a,a)
1, 0, -.5
2, 1, -1.5
4, 2.5, -3
11, 7.5, -8
23, 16, -16.5
64, 45, -45.5

Easiest way to find a candidate by brute force is loop y,
then is SQRT(8y^2 - 7) an integer?

Last edited:

#### Opalg

##### MHB Oldtimer
Staff member
Further thoughts: the first 29 positive values for $y$ are listed at Sloane sequence A006452. You can get the corresponding values for $a$ by solving the quadratic equation $2a^2 + a + 1 = y^2$, to get $$\displaystyle a = \frac{-1 \pm\sqrt{8y^2-7}}{4}.$$ In each case, you have to select the $+$ or $-$ sign for the square root so as to ensure that the numerator is a multiple of $4$.

#### Wilmer

##### In Memoriam
(we may have to call in our resident expert MarkFL at this point)....
Stop making such nice remarks about Mark:
it'll go to his head, and he'll stop buying the rounds 