Find all positive integers $n$ such that $\frac{3^n-1}{2^n}$ is an integer. I need to find all positive integers $n$ such that  $\frac{3^n-1}{2^n}$ is an integer. So far I only found $n=1$, $n=2$ and $n=4$ and solutions to this problem? Is there a way to prove using modular arithmetic that there are no more solutions (or if there are more solutions), because I can't seem to find any more.

If $m$ is odd then the highest power of $2$ that divides $3^m-1$ is $1$ and dividing $3^m+1$ is $2$. If $n=2^k\cdot m $ where $m$ is odd then factorize the numerator as $ (3^m -1)(3^m +1)(3^{2m} +1)...(3^{2^{k-1}m} +1 )$ .From the third term onwards highest power of $2$ dividing each factor is $1$ and hence highest power of $ 2$ dividing the product is $3+k-1=k+2\geq 2^k\cdot m $ . This inequality gives you the desired solutions
