<s>[INST] Find all intergers such that $2n^2+1$ divides $n^3+9n-17$ Find all intergers such that $2n^2+1$ divides $n^3+9n-17$.
Answer : $n=(2 \ and \  5)$
I did it.
As $2n^2+1$ divides $n^3+9n-17$, then $2n^2+1 \leq n^3+9n-17 \implies n \geq 2$
So $n =2$ is solution and doens't exist solution when n<2. How can I do now to find 5 ? Or better, how can you solve this with another good method ?
Thanks
 [/INST] HINT:
If integer $d$ divides $n^3+9n-17,2n^2+1$
$d$ must divide  $2(n^3+9n-17)-n(2n^2+1)=17n-34$
$d$ must divide  $17(2n^2+1)-2n(17n-34)=68n+17$
$d$ must divide  $68n+17-4(17n-34)=153$
So the necessary condition is  $2n^2+1$ must divide $153$
$\implies2n^2+1\le153\iff n^2\le76\iff-9<n<9$
</s>