TITLE: Determine all pairs $(a,b)$ of positive integers such that $ab^2+b+7$ divides $a^2b+a+b$
QUESTION [5 upvotes]: Determine all pairs $(a,b)$ of positive integers such that $ab^2 + b + 7$ divides $a^2b + a +b$.

I guess the trivial solution is $a=b=7$.
Also any $a$ and $b$ which are divisible by $7$ will seem to suit.
we can also write
$b(\frac{a}{b}+1+\frac{7}{b}) \cdot x=a\cdot(ab+1+\frac{b}{a})$
From where all $a, b$ that satisfy: $\frac{b^2}{a}=7$ and $a>b$, are OK.
Is my solution full and complete? Are there any other solutions?

REPLY [4 votes]: First we will dealt with the cases when $b=1,2,3,4,5,6$ and then we can assume that $b \geq 7$,
For the case $b=1$ we get that $a+8 | a^2+a+1$ which means $a(a+8) +r = a^2+a+1$  and we want $r=0 \mod a+8$ so solving the above gives that $r = 1 - 7 a$ so we want that $a+8|1-7a$ which means that $-7(a+8)+r = 1-7a$ and we want $r=0 \mod a+8$ so solving the above gives that $r = 57 \mod a+8$.
Now $57=3*19$ so $3=0 \mod a+8$ or $19 = 0 \mod a+8$ or $57 = 0 \mod a+8$ solving these equations yields that $(11,1)$ and $(49,1)$ are solutions.
Doing the same for $b=2,3,4,5,6$ yields that there are no solutions.
Now we can assume $b \geq 7$, also $a \geq b \geq 7$, because if we let $a< b$ and $a b^2 +b +7 < a^2 b+a+b$ we will get contradiction arriving at $a \geq b-\frac{1}{7}$ and since $a,b$ are integers we get that $a\geq b$.
Divide the equation by $a b$ we get that $(b+\frac{1}{a}+\frac{7}{ab})x = a+\frac{1}{a} +\frac{1}{b}$ which is just $ b x +\frac{x}{a}+ \frac{7x}{ab} = a+\frac{1}{a}+\frac{1}{b}$
Now we know that $\frac{1}{a}+\frac{1}{b} \leq \frac{2}{7}<1$ so assuming that $\frac{x}{a}+ \frac{7x}{ab} <1$ we must have that $a = b x$ substituting that we get that $b=7x$ so $a = b x = 7x x = 7x^2$ for all $x \geq 1$.
Now, what if $\frac{x}{a}+ \frac{7x}{ab}\geq y \geq 1$ we get that $a= b x+y$ substituting we get that $\frac{7 x}{b (b x+y)}+\frac{x}{b x+y}+b x = \frac{1}{b x+y}+b x+\frac{1}{b}+y$  which is $\frac{7 x}{b (b x+y)}+\frac{x}{b x+y}-\frac{1}{b x+y}-\frac{1}{b}-y=0$ solving for $x$  we get that $x =\frac{-b y^2-b-y}{b^2 y-7}$ Now since $b \geq 7 $ and $y \geq 1$ the denominator is non-negative and the numerator is negative so $x$ is negative which is contradiction thus,
the solutions $(11,1),(49,1),(7x^2,7x)$ for all $x\geq 1$ are the only solutions.