TITLE: Integral solutions of $a^{2} + a = b^{3} + b$
QUESTION [7 upvotes]: Find all pairs of coprime positive integers $(a,b)$ such that 
$b<a$ and $a^2+a=b^3+b$
My approach:
$a(a+1)=b(b^2+1)$ so $a|(b^2+1)$ and $b|(a+1)$
Now after this I am not able to do anything.pls help.

REPLY [20 votes]: As you already note, if $a$ and $b$ are coprime and
$$a(a+1)=a^2+a=b^3+b=b(b^2+1),$$
then it follows that $b$ divides $a+1$. Then $a=bc-1$ for some integer $c$, where $c>1$ because $a>b$. Then
$$b^3+b=a^2+a=(bc-1)^2+(bc-1)=c^2b^2-cb,$$
and since $b$ is positive we can divide both sides by $b$ and rearrange to get the quadratic
$$b^2-c^2b+c+1=0,$$
in $b$.
This shows that the integer $b$ is a root of a quadratic equation with discriminant
$$\Delta=(-c^2)^2-4\cdot1\cdot(c+1)=c^4-4c-4.$$
In particular this means $c^4-4c-4$ is a perfect square. Of course $c^4$ is itself a perfect square, and the previous one is
$$(c^2-1)^2=c^4-2c^2+1,$$
which shows that $-4c-4\leq-2c^2+1$, or equivalently
$$2c^2-4c-5\leq0.$$
A quick check shows that this implies $c<3$, so $c=2$. Then this plugging back in yields
$$b^3+b=a^2+a=(2b-1)^2+(2b-1)=4b^2-2b,$$
which we can rearrange to get the cubic
$$b^3-4b^2+3b=0\qquad\text{ and hence }\qquad b^2-4b+3=0.$$
Then either $b=1$ or $b=3$, corresponding to $a=1$ and $a=5$, respectively. Hence the only solution with $a>b$ is $(a,b)=(5,3)$.