I want to investigate for which $n\geq0$ the expression $n*2^n + 1$ is divisible by $3$. I’ve tried applying Fermat’s little theorem but without any success and believe this is not the correct way to go about it. Any tips or hints would by highly appreciated.
Best regards, David
Observe that if $n$ is even ($n=2k$) then $2^n \equiv (2^2)^k \equiv 1^k \equiv 1 \pmod{3}$ and when $n$ is odd then $2^n \equiv -1 \pmod{3}$.
Let $n$ be even, then \begin{align*} n2^n+ 1 & \equiv n(1)+1 \pmod{3}\\ & \equiv n+1 \pmod{3} \end{align*}
We want this to be $0 \mod 3$, so $n \equiv 2 \pmod{3}$. We have the following conditions on $n$, $$n \equiv 0 \pmod{2} \quad \text{and} \quad n \equiv 2 \pmod{3}.$$
This can be consolidated as $n \equiv 2\pmod{6}$.
Likewise you can deal with the other case.