Finding $a_{1996}$ if $\prod_{n=1}^{1996}(1+nx^{3^n})= 1+a_1x^{k_1} + a_2x^{k_2} + \cdots + a_mx^{k_m}$ I need to find the coefficient $a_{1996}$

$$\prod_{n=1}^{1996}(1+nx^{3^n})= 1+a_1x^{k_1} + a_2x^{k_2} + \cdots + a_mx^{k_m}$$

$a_1, a_2, ... , a_m$ are non zero.

$k_1 &lt; k_2 &lt;... &lt; k_m$ 

So if $x=1$ you can find the sum of all coefficients, but I am not sure how to use this fact

Do I need to simplify the product somehow plug different values of x and check if something can be approximated that way, or would that be a waste of time?

Thanks,
What powers of $x$ appear as a term in the expression? Of course $x^0$. And $x^3$. More generally, any positive integer that can be built from summing powers of $3$ with no repeats.
$$x^0,\overset{1\text{st}}{x^3},\overset{2\text{nd}}{x^9},\overset{3\text{rd}}{x^{12}},\overset{\cdots}{x^{27}},x^{30},x^{36},x^{39},\ldots$$
In base 3, these are numbers that use only 0 and 1 for their digits, with a 0 in the &quot;ones&quot; place.
$$x^0,x^{10},x^{100},x^{110},x^{1000},x^{1010},x^{1100},x^{1110},\ldots$$
So what would be the 1996th term's power of $x$? In binary, 1996 is $$11111001100$$
So we are looking for $x^{111110011000}$ but the exponent is in base 3. It is built from multiplying $$x^{3^{11}}x^{3^{10}}x^{3^{9}}x^{3^{8}}x^{3^{7}}x^{3^{4}}x^{3^{3}}$$
So its coefficient is $$11(10)(9)(8)(7)(4)(3)=665280$$
All the non-zero coefficients are of the form $a_n$ with $n=\sum_k3^{i_k}$, $i_k\ge1$. As a result, $n$ must be divisible by $3$ if $a_n\ne 0$. Since $1996$ is not divisible by $3$, its coefficient is $0$.