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
 A: Mod $(2n-1)$, you have that $2n\equiv1$. Now suppose $(2n-1)$ divides $n^3+1$. So always mod $(2n-1)$:
$$
\begin{align}
n^3&\equiv-1\\
8n^3&\equiv-8\\
(2n)^3&\equiv-8\\
(1)^3&\equiv-8\\
1&\equiv-8\\
9&\equiv0
\end{align}
$$
So $2n-1$ must divide $9$. That doesn't leave too many options to check. (Be sure to look at both positive and negative divisors of $9$.)
A: Hint. If $(2n-1)\mid(n^3+1)$, then at least $(2n-1)\mid8(n^3+1)$. Hence
$$\frac{8(n^3+1)}{2n-1}=(4n^2+2n+1)+\frac9{2n-1}$$
is an integer. Hence $(2n-1)\mid 9$. Can you finish it now?
A: 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$.
A: $$ 2n-1\mid (2n-1)(4n^2+2n+1) = 8n^3-1$$
and $$2n-1\mid 8n^3+8$$ so $$2n-1\mid (8n^3+8) - (8n^3-1)=9$$
