<s>[INST] Maximum power of $2$ which divides $3^{1024}-1$ What is the maximum power of $2$ which completely divides $3^{1024}-1$?
I proceeded thus:
$\phi(2^n)=2^{n-1}$ for all $n\ge1$
$$3^{1024}=3^{2^{10}}\equiv1\pmod {2^{11}}$$
$$3^{1024}-1\equiv0\pmod {2^{11}}$$
Since $\phi(2^{11})=2^{10}$.  So, maximum power of $2$ must be $11$.
But the answer says it is $12$.
Where am I wrong and how to solve it correctly? 
 [/INST] As requested in the comments:
We start by factoring the polynomial $x^{1024}-1$.  To do that, we note that $1$ is a root, as is every $2^k-$root of $1$ for $k=0,\cdots 10$.  For $k>0$ such a root of unity is also a $2^{k-1}-$st root of $-1$ so our polynomial is divisible by $$(x-1)\times \prod_{k=0}^9(x^{2^k}+1)$$
Comparing the lead terms shows that this is in fact equal to our polynomial.
Now, let $x=3$.   We remark that $$3\equiv -1 \pmod 4 \implies 3^{2i}+1\equiv 2 \mod 4$$ so most of the terms in the product are divisible by $2$ but not by $4$.  $3-1=2$, of course, and $3+1=4$ is the only term in the product divisible by a higher power of $2$.  $(3-1)(3+1)$ then gives us a factor of $2^3$ and the other nine terms in the product each give us exactly one factor of $2$, making the answer $12$ as desired.
</s>