Divisibility of $n\cdot2^n+1$ by 3. I want to examine and hopefully deduce a formula that generates all $n\geq0$ for which $n\cdot2^n+1$ is divisible by $3$. Let's assume that it is true for all $n$ and that there exist a natural number $k\geq0$ such that $$n\cdot2^n+1=3k,$$
Now I want to proceed with induction, but clearly this will not work because for $n=3$ we have $3\cdot2^3+1=3\cdot8+1=24+1=25$ which is clearly not divisible by $3$. 
Any ideas how to evaluate a formula that generates all the $n$'s for which $n2^n+1$ is divisible by $3$?

For any natural number $ n $ we have that $ n \equiv i $ mod $ 3 $ where $ i \in \{0,1,2\} $. So let us consider each case. 
If $ n \equiv 0 $ mod $ 3 $ then clearly $ n2^{n}+1 \equiv 1 $ mod $ 3 $ so this is not a valid case. 
Suppose now that $ n \equiv 1 $ mod $ 3 $ and write $ n=3k+1 $. Then $$ n2^{n}+1=(3k+1)2^{3k+1}+1 \equiv 2^{3k+1}+1   (mod  3)  \equiv 2 \cdot 8^{k}+1  (mod  3 ) \equiv 2 \cdot (-1)^{k}+1 (mod 3) $$
Therefore $ k $ must be even in this case so $ k=2l $ for some integer $ l $ thus $ n=6l+1 $.
Finally, if $ n \equiv 2 (mod 3) $, write $ n=3k+2 $. Then we have $$ n2^{n}+1=(3k+2)\cdot 2^{3k+2}+1 \equiv 2 \cdot 2^{3k+2}+1 (mod 3)\equiv 8^{k+1}+1 (mod 3) \equiv (-1)^{k+1}+1 (mod 3) $$
Hence in this case, we must again have that $ k $ is even i.e. $ k=2l $ for some integer $ l $ so $ n=6l+2 $.
Therefore we conclude that the only positive integers $ n $ satisfying the condition in the hypothesis are those $ n's $ congruent to $ 1 $ or to $ 2 $ modulo $ 6 $.
