I would like to find the greatest k such that $p=\frac{3^n - 1}{2}$ is divisible by $2^k$.
Since $p$ is the repunit number in base 3 it is already clear that if $n$ is even, $p$ would be divisible by 4 (since we could write $p/2 = 2020...202$ in base 3).
Thus, $p/4 = 1010...101$ which is divisible by 8 only if there is an even number of $1$ wich is equivalent to $n$ being divisible by 4.
Starting from here the pattern gets longer and longer, and I'm not able to generalize for any given $k$. Would someone have an idea?