<s>[INST] Find coefficients of $x^{2012}$ in $(x+1)(x^2+2)(x^4+4)\cdots (x^{1024}+1024)$ Find coefficients of $x^{2012}$ in $(x+1)(x^2+2)(x^4+4)\cdots (x^{1024}+1024)$
Attempt:  i have break $2012$ in to sum of power of $2$
as $2012 = 2^{10}+2^{9}+2^{8}+2^7+2^6+2^4+2^3+2^2$
but wan,t be able to go further, could some help me , thanks
 [/INST] What is the coefficient of $x^5$ in $(x+1)(x^2+2)(x^4+4)(x^8+8)(x^{16}+16)$?
$5$ in binary is $101_2$, or $5 = 2^0 + 2^2$
This means the coefficient of $x^5$ will be formed by looking at the term $x^5 = x^{2^0}x^{2^2} = x \cdot x^4$ and multiplying it by the constant term contributed from everything else in the expression.
$(x+1)(x^2+2)(x^4+4)(x^8+8)(x^{16}+16) \\= \left[(x+1)(x^4+4)\right](x^2+2)(x^8+8)(x^{16}+16) \\= \left[x^5 + 4x + x^4 + 4\right](x^2+2)(x^8+8)(x^{16}+16)$
Note that now the answer only depends on taking $x^5$ times the constant term from the righthand part, i.e. $2^1 \cdot 2^3 \cdot 2^4 = 2 \cdot 8 \cdot 16 = 256$
In other words: Multiply together the constant terms corresponding to the pieces that aren't involved in the binary representation of the exponent you want.
We know that $x^{2012} = x^{2^2}x^{2^3}x^{2^4}x^{2^6}x^{2^7}x^{2^8}x^{2^9}x^{2^{10}}$, therefore the coefficient of $x^{2012}$ is $2^0 \cdot  2^1 \cdot 2^5 = 64$.
</s>