Determine all positive integers $n$ such that 3 divides $n 2^{n}+1$.

 untranslated text has been directly translated while preserving the formatting and structure.
We look at the cycle of powers of 2 modulo 3. This cycle has a period of $2$: if $n$ is even, $2^{n} \equiv$ $1(\bmod 3)$ and if $n$ is odd, $2^{n} \equiv 2(\bmod 3)$. Thus, if $n$ is even, $n 2^{n}+1 \equiv 0(\bmod 3) \Leftrightarrow n+1 \equiv$ $0(\bmod 3) \Leftrightarrow n \equiv 2(\bmod 3)$. Similarly, if $n$ is odd, $n 2^{n}+1 \equiv 0(\bmod 3) \Leftrightarrow 2 n+1 \equiv 0$ $(\bmod 3) \Leftrightarrow n \equiv 1(\bmod 3)$.

By the Chinese Remainder Theorem, $n$ even and $n \equiv 2(\bmod 3)$ is equivalent to $n \equiv 2(\bmod 6)$. Similarly, $n$ odd and $n \equiv 1(\bmod 3)$ is equivalent to $n \equiv 1(\bmod 6)$. In conclusion, the solutions are the integers congruent to 1 or 2 modulo 6.