TITLE: Positive integer solution for $2n^3 + 5 \mid n^4+n+1$
QUESTION [5 upvotes]: I am starting to study number theory and came across this question on the book I'm reading:

Give all positive integer values for n such that $2n^3 + 5 \mid n^4+n+1$.

I came up with an attempt but it doesn't seem right, can anyone help me figure it out?

We know $2n^3 +5 \mid n^4+n+1$ and trivially, $2n^3 + 5\mid 2n^3 + 5$.
From $a \mid b, a \mid c \implies a \mid xb + yc, x,y \in \mathbb{Z}$ we can show $2n^3+5 \mid n(2n^3+5) - 2(n^4 + n + 1) = 3n-2$
We also know that $a\mid b \implies a = 0$ or $|a| \le |b|$. From the first part, $3n-2=0 \implies n \notin 
 \mathbb{Z}$. From the second part, $|2n^3+5| \le |3n-2|$. I didn't prove this but this inequality doesn't seem to have any positive integer solutions

Any help is appreciated.

REPLY [3 votes]: You're almost there, though your last bullet point is not quite correct; it should be
$$a\mid b\quad\implies\quad b=0\ \text{ or }\ |a|\leq|b|.$$
Of course $3n-2=0$ is impossible, so indeed you get $|2n^3+5|\leq|3n-2|$.
The left hand side of this inequality clearly grows faster than the right hand side, so there can only be finitely many solutions. Now it suffices to find an upper bound for solutions, and then to check all values of $n$ up to that bound. Can you find an upper bound for $n$?
Here's example of such an upper bound (try to find one by yourself first):

 For example, if $n\geq2$ then $n^3\geq4n$ and so $$2n^3+5\geq8n+5>3n-2,$$ and then it suffices to check the inequality for $n=1$.