Find all natural numbers $n$ such that $2^n$ divides $3^n -1$ 
Find all natural numbers $n$ such that $2^n$ divides $3^n -1$

I think that the only solutions are $n = 0,1,2,4$, but I have no idea on how to prove it.
I tried to write $3^n-1$ as $1+3+3^2+...+3^{n-1}$ and manipulate the sum but found my self at the equally hard problem of finding the power of two dividing $3^k+1$

The result is clear for $n = 0$. For $ n = 1, 2, 3 \ldots$ let the highest power of $2$ that divides $3^n - 1$ be $2^{p(n)}$. If $n$ is odd, say $n = 2m + 1$, then $3^n - 1 = (3 - 1)(3^{2m} + 3^{2m - 1} + \cdots + 1)$. The sum has an odd number of terms, so $p(n) = 1$. If $n$ is even, say $n = 2m$, then $3^n - 1 = (3^m - 1)(3^m + 1)$. By induction, $3^m \equiv 1 \mod 8$ if $m$ is even and $3^m \equiv 3 \mod 8$ if $m$ is odd. Hence $p(2m) = p(m) + 1$ if $m$ is even, $p(m) + 2$ if m is odd. By applying this repeatedly we get that if $n = 2^ab$, where $a > 0$ and $b$ is odd, then $p(n) = a + 2$. It follows easily that for $n > 0$ we have $p(n) \ge n$ iff $n = 1, 2, 4$.
