Find all pairs $(a,b)$ of positive integers, such that $\frac{b^2+ab+a+b-1}{a^2+ab+1}$ is integer.

119 Views Asked by At

Find all positive integers $a$ and $b$ such that $$\frac{b^2+ab+a+b-1}{a^2+ab+1}$$ is integer.

My work so far:

If $a=1, b\in\mathbb N$ then $$\frac{b^2+ab+a+b-1}{a^2+ab+1}=\frac{b^2+2b}{b+2}=b \in \mathbb Z$$

1

There are 1 best solutions below

0
On BEST ANSWER

You have $a(a+b)+1=a^2+ab+1$ divides $$\left(b^2+ab+a+b-1\right)+\left(a^2+ab+1\right)=(a+b)(a+b+1)\,.$$ Because $\gcd\big(a(a+b)+1,a+b\big)=1$, we must have $a(a+b)+1\mid a+b+1$. The rest should be easy.