For which $n \ge 0$ is $n \cdot 2^n + 1$ divisible by 3? $\textbf{Edit:}$
Thank you all so much for all your help! Superglad I chose to ask. All your different approaches were very insightful and taught me a lot. Thank you!
Same question: Found here.
Hi,
I'm a bit stuck with my question. I've read through the answers in the above link, but I cannot quite understand the answers fully. I don't want to hijack the other thread either, so I thought I'd start a separate thread.
$\textbf{The question is:}$
For which ${n \ge 0}$ is the number ${n \cdot 2^n + 1}$ divisible by 3?
I'v gotten this far in my understanding:
For even ${n(n=2k)}$:
\begin{equation}
      \begin{aligned}
          2^n&=2^{2k} \equiv_3 4^k \equiv_3 1^k \equiv_3 1\\
          n\cdot 2^n+1 &\equiv_3 n\cdot 1 + 1 \equiv_3 n +1
      \end{aligned}
 \end{equation}
For odd ${n(n=2k+1)}$:
\begin{equation}
       \begin{aligned}
           2^{2k+1}&=2^{2k}\cdot 2 \equiv_3 1^k \cdot -1 \equiv_3 1 \cdot - 1 \equiv_3 -1\\
           n\cdot 2^n+1 &\equiv_3 n\cdot -1 + 1 \equiv_3 -n +1
       \end{aligned}
  \end{equation}
One of the answers in the link above mentioned
\begin{equation}
n\equiv 0 (\text{mod 2})\qquad n\equiv 2(\text{mod 3})
\end{equation}
which could be "consolidated as ${n\equiv 2 (\text{mod 6})}$".
I don't understand what the "consolidate"-part means.
So, would someone please like to share some knowledge and insights with me? It feels like I'm almost there, but still a far way to go.
Thanks

HINT:
$n\pmod3$ is determined by $n\pmod3$, and $2^n\pmod3$ is determined by $n\pmod2$, so $n2^n+1\pmod3$ is determined by $n\pmod6$. Now, all that is left is to check the values for $n=0,1,2,3,4,5$.
