Prime Numbers and Canonical Factorization. Find $n$ such that $2^{n} \mid 3^{1024}−1$, where $n$ is an integer. I factorized $3^{1024}−1$ as $a^{2}-b^{2}$ and showed $2 \mid 3^{1024}-1$. Help me to get $n$.

$$2^n||3^{1024}-1$$
We know that $2^{10}=1024$ and $a^2-b^2=(a+b)(a-b)$
Now,
$$3^{2^{10}}=(3^{2^9}+1)(3^{2^9}1)$$
$$=(3^{2^9}+1)(3^{2^8}+1)(3^{2^8}-1)$$
$$=(3^{2^9}+1)(3^{2^8}+1)(3^{2^7}+1)(3^{2^7}-1)$$
$$.$$
$$.$$
$$=(3^{2^9}+1)(3^{2^8}+1)(3^{2^7}+1)....(3^{2^1}+1)(3^{2^0}+1)(3-1)$$
To find the largest $n$, $2^n||3^{1024}-1$, $2^n$ should divide $3^{1024}-1$
$$3^{2^{10}}=(3^{2^9}+1)(3^{2^8}+1)(3^{2^7}+1)(3^{2^6}+1)(3^{2^5}+1)(3^{2^4}+1)(3^{2^3}+1)(3^{2^2}+1)(3^{2^1}+1)(3^{2^0}+1)(3-1)$$
Note that each factor divides $2$ only once except $3^{2^0}+1$ which divides it by $2$ times
Therefore, there $11$ factors out of which $3^{2^0}+1$ divides $2$ times.
$$n=12$$
