Clearly $n$ cannot be a multiple of $3$, so the possible choices are $n=3k+1, 3k+2$
Case 1: if $n=3k+1$
$3|(3k+1)\cdot(2^{3k+1})+1 \equiv 2^{3k+1}+1 \equiv 0 (mod 3)$
$\Rightarrow 2^{3k+1} \equiv -1 (mod 3)$
$\Rightarrow 2^{k+1} \equiv -1 (mod 3)$
$\Rightarrow (-1)^{k+1} \equiv -1 (mod 3)$
$\Rightarrow k+1$ is odd $\Rightarrow k$ is even
therefore $k=2m$ where $m \in \mathbb{Z} \Rightarrow n=3(2m)+1=6m+1$
$2^{3k+1}+1=2^{6m+1}+1$ which is always divisible by $3$.
Thus we get $n=6m+1$, $m \in \mathbb{Z}$.
The second case is very similar to this case.