<s>[INST] Find all integers such that $2n-1 | n^3 +1$ I try
$$2n-1| n^3 +1$$
$$\therefore 2n11 | 2n^3 + 2 -n^2(2n-1)$$
$$\therefore 2n-1| 4n-2$$
But but this is valid for all $n$. How to proceed? Thanks in advance
and I'm sorry if this is a duplicate, I don't see any similar questions
 [/INST] Problem.  Find all integers $n$ such that $2n - 1\, |\, n^3 + 1$.
Sol.  Let $(a, b)$ denote the greatest common divisor (gcd) of $a$ and $b$. Then
$$\begin{array}{lll}
(2n - 1, n^3 + 1) &= (2n - 1, n^3 + 2n) \\
&= (2n - 1, n^2 + 2) \mbox{ since } (2n - 1, n) = 1 \\
&= (2n - 1, n^2 + 2 + 4n - 2) = (2n - 1, n(n + 4)) \\
&= (2n - 1, n + 4) \mbox{ since } (2n - 1, n) = 1 \\
&= (2n - 1 - 2(n + 4), n + 4) = (-9, n + 4).
\end{array}$$
 Since $2n - 1\, |\, n^3 + 1$, $2n - 1\, |\, 9$. So, $n$ may be $-4, -1, 0, 1, 2, 5$.
</s>