<s>[INST] $2^{3^{n}}+1=(2+1)\left(2^{2}-2+1\right)\left(2^{2 \cdot 3}-2^{3}+1\right) \cdots\left(2^{2 \cdot 3^{n-1}}-2^{3^{n-1}}+1\right)$ I was reading a solution in which author used this identity without giving any hint that how it comes ...{maybe it is obvious}
$2^{3^{n}}+1=(2+1)\left(2^{2}-2+1\right)\left(2^{2 \cdot 3}-2^{3}+1\right) \cdots\left(2^{2 \cdot 3^{n-1}}-2^{3^{n-1}}+1\right)$
by using expansion of $a^n+b^n$ i get
$2^{3^{n}}+1=(2+1)(2^{3^n-1}-2^{3^n-2}+....+1)$
but how we get above ???
 [/INST] For those of you who would like to see the full version of this:
Applying the factorization $x^3+1=(x+1)(x^2-x+1)$ to $x=a^{3^k}$ gives
$$ a^{2 \cdot 3^k}-a^{3^k}+1 = \frac{a^{3^{k+1}}+1}{a^{3^k}+1}. $$
Therefore,
$$ \prod_{k=0}^{n-1} \left(a^{2 \cdot 3^k}-a^{3^k}+1\right) = \prod_{k=0}^{n-1} \frac{a^{3^{k+1}}+1}{a^{3^k}+1} = \frac{a^{3^n}+1}{a^{3^0}+1} = \frac{a^{3^n}+1}{a+1}. $$
The second equality in the displayed equation above is an example of telescoping product - each denominator cancels the following numerator, leaving us the first numerator and the last denominator.
</s>