TITLE: $\frac{a^{2}-1}{b+1}+\frac{b^{2}-1}{a+1}$ an integer $\Rightarrow \frac{a^{2}-1}{b+1}$ and $\frac{b^{2}-1}{a+1}$ are integers.
QUESTION [13 upvotes]: If $\frac{a^{2}-1}{b+1}+\frac{b^{2}-1}{a+1}$ is an integer, prove that also $\frac{a^{2}-1}{b+1}$ and $\frac{b^{2}-1}{a+1}$ are integers.
By doing the math, I get $\frac{(a-1)(a+1)^{2}+(b-1)(b+1)^{2}}{(a+1)(b+1)}$ is an integer which means that $(a+1)(b+1)$ divides $(a-1)(a+1)^{2}+(b-1)(b+1)^{2}$.
but I don't know how to continue.
By the way, this is not homework or anything. I just found it in a book.

REPLY [4 votes]: Call the fractions $r,s.\,$ Note $\,rs = (a\!-\!1)(b\!-\!1) := m\in \Bbb Z,\,$ so if $\,r\!+\!s = n\in\Bbb Z\,$ then $\,r,s\,$ are roots of $\, (x-r)(x-s)\, =\ \color{#c00}1\cdot x^2 - n\, x + m\,$
so $\,r,s\in \Bbb Z\,$ by Rational Root Test (i.e. if $\,c/d\,$ is a reduced rational root then $\,d\mid\color{#c00}1,\,$ so $\,d\!=\!1,\,$ so $\,c/d\in\Bbb Z)$.
Generally this shows $\,\bbox[5px,border:1px solid #c00]{\text{two rationals with integer sum & product must be integers}}$