Find all integers of the form $\frac{(x-1)^2(x+2)}{2x+1}$ I made a python program and I have that
\begin{array}{|c|c|}
\hline x & \frac{(x-1)^2(x+2)}{2x+1} \\\hline
  -14 & 100 \\\hline
-5& 12 \\\hline
-2&0 \\\hline
-1&4 \\\hline
0&2 \\\hline
1&0 \\\hline
4&6 \\\hline
13&80 \\\hline
  \end{array}
And taking very large intervals of integers this seems like the only integers of this form.
However I don't know how can i proved.
Any ideas?
 A: Assuming $x$ is an integer
as $2x+1$ is odd
$2x+1$ will divide $(x-1)^2(x+2)$
iff $2x+1$ divides $(2x-2)^2(2x+4)=u$
Let $2x+1=y, u=(y-3)^2(y+3)\equiv27\pmod y$
So, the necessary & sufficient condition is: $y=2x+1$ must divide $27$
A: Note that $\gcd(x,2x+1)=1$, then:
$$\frac{(x-1)^2(x+2)}{2x+1}=\frac{x^3-3x+2}{2x+1}=\frac{x^3-7x}{2x+1}+2=\frac{x(x^2-7)}{2x+1}+2\iff \\
\frac{x^2-7}{2x+1}=\frac{x^2+14x}{2x+1}-7=\frac{x(x+14)}{2x+1}-7 \iff \\
\frac{x+14}{2x+1}=14-\frac{27x}{2x+1} \iff \\
\frac{27}{2x+1} \iff \\
x\in \{-14,-5,-2,-1,0,1,4,13\}$$
A: $\bmod 2x\!+\!1\!:\ \, x\equiv -\dfrac{1}2\ $ so $\ 0\equiv(x\!+\!2)(x\!-\!1)^2\equiv\dfrac{3}2 \left[\dfrac{-3}2\right]^2\equiv \dfrac{27}8\iff 27\equiv 0$
A: 2x+1 divides a polynomial expression, when the expression evaluated at -(x+1) divides by 2x+1. This comes from polynomial remainder theorem, applied algebraically.
This means if any solutions exist, they turn up in pairs (x,-(x+1)). 
Now expanding the numerator mod 2x+1, we get: $$x^3+x+4=(x)(x^2+1)+4$$ 4 dividing by 1, allows x=0 to work. that shows x=-1 works. 4 not dividing by 5 shows x=2 doesn't work. This implies x=-3 won't either, because if it did x=2 would be forced to work. You can keep repeating this, or find a better relation to use like the other answers. 
