A number theory book I'm reading used this factorization as a main step for a proof:
Given $m > n$, integers, $$\left( a^{2^{m}} - 1 \right) = \left( a^{2^{m-1}} + 1 \right)\left( a^{2^{m-2}} + 1 \right) \left( a^{2^{m-3}} + 1 \right) \cdots \left( a^{2^n} + 1 \right) \left( a^{2^n} - 1 \right)$$
Original from the book (in Portuguese):
I'm having a bit of trouble trying to understand how to derive it systematically (in a simple way, without lots of calculations).
If this a known common factorization? Im I missing something? If so (or not) could one suggest source to learn such factorizations?
Sorry for the possibly relatively low effort question. I just tried to find material on such factorizations and could not find.
Thanks in advance.

Let’s start with an example. Let $m=5,n=2$. Now, we will use the formula $$k^2-1=(k+1)(k-1)\tag{1}$$ repeatedly. We notice that $a^{2^m}=a^{2^{m-1}\cdot2}=\left(a^{2^{m-1} }\right)^2$ $$a^{2^m}-1 =\left(a^{2^{m-1} }\right)^2-1=(a^{2^{m-1}}+1) (a^{2^{m-1}}-1)$$ So $$a^{32}-1=(a^{16}+1)(a^{16}-1).$$ Using $(1)$ again, we’ll get $$a^{32}-1=(a^{16}+1)(a^{8}+1)(a^8-1).$$$$= (a^{32}+1)(a^{16}+1)(a^{8}+1)(a^4+1)(a^4-1)$$ etc. Notice that the last two terms can be written as $$(a^{2^2}+1)(a^{2^2}-1)= (a^{2^n}+1)(a^{2^n}-1) $$ for $n=2$.
As an algebraic example, as suggested by user @TomKern, $$ \bbox[5px,border:2px solid red]{(x^{16}-1)=(x^8+1)(x^8-1)=…=(x^8+1)(x^4+1)(x^2+1)(x+1)(x-1)}.$$ Thus, if $m,n\in \mathbb Z_+$, $n<m$, then we can write $$a^{2^m}-1 =\left(a^{2^{m-1} }\right)^2-1=(a^{2^{m-1}}+1) \color{blue}{(a^{2^{m-1}}-1)}$$$$= (a^{2^{m-1}}+1) \color{blue}{(a^{2^{m-2}}+1) (a^{2^{m-2}}-1)}$$$$= (a^{2^{m-1}}+1) (a^{2^{m-2}}+1) \color{red}{(a^{2^{m-3}}+1) (a^{2^{m-3}}-1)}$$ $$=…$$$$= (a^{2^{m-1}}+1) (a^{2^{m-2}}+1) (a^{2^{m-3}}+1)(a^{2^{m-3}}+1)… \color{blue}{(a^{2^{m-k}}-1)(a^{2^{m-k}}+1)} $$ where $k\in${$1,2,3,…,m-1$} so that $m-k=n$ is an integer less than $m$. This train of factors can be stopped anywhere in between, but if continued as long as possible, you’ll finish the sequence with $(a^{2^{m-1}}+1) …(2+1)(2-1)$.
One can also do this the reverse way. For eg, $$(2^{128}+1)(2^{64}+1)(2^{32}+1)…(2+1)$$$$= (2^{128}+1)…(2+1)\cdot1$$$$= (2^{128}+1)…(2+1)(2-1)$$$$= (2^{128}+1)…(2^2+1)(2^2-1)=…=2^{256}-1.$$