Find all pairs of integers (a,b), such that $a² + ab - b = 2018$

551 Views Asked by At

'Find all pairs of integers $(a,b)$ such that $a² + ab - b = 2018$'

The way I have approached this is by considering each variables parity and then letting it be expressed as that parity with a different expression. For example, through casework, $a$ and $b$ must both be even integers so I let $a = 2m$ and $b = 2n$. I have continued this a little further, but I would like to know if there is a more elegant way of solving it rather than my brute force method.

1

There are 1 best solutions below

0
On BEST ANSWER

$a^2+ab-b=(a-1)(a+b+1)+1=2018$

$(a-1)(a+b-1)=2017$

Therefore $a-1=2017,1,-1,-2017$

All the pairs $(a,b)$ are $(2018,-2018),(2,2017),(0,-2018),(-2016,2016).$