<s>[INST] Evaluating $(2^1 + 3^1)(2^2 + 3^2)(2^4 + 3^4)(2^8 + 3^8)(2^{16} + 3^{16})...(2^{64} + 3^{64})$ I'm trying to evaluate the following expression$$(2^1 + 3^1)(2^2 + 3^2)(2^4 + 3^4)(2^8 + 3^8)(2^{16} + 3^{16})...(2^{64} + 3^{64})$$
I'm not really used to these types of problems, so I first tried using logarithms but I'm not sure what to do from there. See:
Let $P = (2^1 + 3^1)(2^2 + 3^2)(2^4 + 3^4)(2^8 + 3^8)(2^{16} + 3^{16})...(2^{64} + 3^{64})$.
Then we have:
$$\log_2{P} = \log_2((2^1 + 3^1)...(2^{64} + 3^{64}))$$
$$\log_2{P} = \log_2(2^1 + 3^1) + \log_2(2^2 + 3^2) + ... + \log_2(2^{64} + 3^{64})$$
$$P = 2^{2^1 + 3^1} + 2^{2^2 + 3^2} +... + 2^{2^{64} + 3^{64}}$$
$$P = 2^{2^1}2^{3^1} + 2^{2^2}2^{3^2} +... + 2^{2^{64}}2^{3^{64}}$$
Would factoring $2^2$ be of any use here?
 [/INST] Sayan Dutta shows a clever way. Another way is to note that when you multiply the parentheses, each term will be of the form $2^n 3^{127-n}$:
$$
(2^1 + 3^1)(2^2 + 3^2)(2^4 + 3^4)(2^8 + 3^8)(2^{16} + 3^{16})...(2^{64} + 3^{64})
= \prod_{k=0}^{6} (2^{2^k}+3^{2^k})
\\
= \sum_{n=0}^{127} 2^n 3^{127-n}
= 3^{127} \sum_{n=0}^{127} (2/3)^n
= 3^{127} \frac{1-(2/3)^{128}}{1-2/3}
= 3^{128} \frac{1-(2/3)^{128}}{3-2}
= 3^{128} - 2^{128}.
$$
</s>