How to show that the summation equal to $(t(n)+1)$ Why is
$$ \sum_{n=1}^{\infty} x^{2n^2} +\sum_{n=1}^{\infty} x^{8n^2} + \sum_{n=1}^{\infty} x^{32n^2}+\cdots = \sum_{n=1}^{\infty}(t(n)+1) x^{2n^2} $$
Where $t(n)$ is the highest power of 2 which divides $n$
My attempt : list $t(n)$ first and make the $t(n)$ table from $1\leq n \leq 20$. And the last, i know the summantion of $x^{2n^2},x^{8n^2},\cdots$ will be equal to summantion $(t(n)+1) x^{2n^2}$ . but my teacher forbids using that method. Can you help me for to find another way?
 A: We use the coefficient of operator $[x^n]$ to denote the coefficient of $x^n$ of a series.

We obtain
\begin{align*}
\color{blue}{[x^{2n^2}]}&\color{blue}{\left(\sum_{m=1}^{\infty}x^{2m^2}+\sum_{m=1}^{\infty}x^{8m^2}
+\sum_{m=1}^{\infty}x^{32m^2}+\cdots\right)}\\
&=[x^{2n^2}]\sum_{q=0}^{\infty}\sum_{m=1}^{\infty}x^{2^{2q+1}m^2}\\
&=[x^{2n^2}]\sum_{q=0}^{\infty}\sum_{m=1}^{\infty}x^{2\left(2^{q}m\right)^2}\\
&=[x^{2\left(2^{t(n)}s(n)\right)^2}]\sum_{q=0}^{\infty}\sum_{m=1}^{\infty}x^{2\left(2^{q}m\right)^2}\tag{1}\\
&=[x^{2\left(2^{t(n)}s(n)\right)^2}]\sum_{q=0}^{t(n)}\sum_{m=1}^{\infty}x^{2\left(2^{q}m\right)^2}\tag{2}\\
&=[x^{2\left(2^{t(n)}s(n)\right)^2}]\sum_{q=0}^{t(n)}x^{2\left(2^{q}2^{t(n)-q}s(n)\right)^2}\tag{3}\\
&=\sum_{q=0}^{t(n)}1\tag{4}\\
&\,\,\color{blue}{=t(n)+1}
\end{align*}
and the claim follows.

Comment:

*

*In (1) we use the unique representation $n=2^{t(n)}s(n)$ with $s(n)$ an odd non-negative integer.


*In (2) we set the upper limit of the outer sum to $t(n)$ since higher powers of $2$ do not contribute to $[x^{2\left(2^{t(n)}s(n)\right)^2}]$.


*In (3) we choose $m=2^{t(n)-q}s(n)$ in order to match the coefficient of $x^{2\left(2^{t(n)}s(n)\right)^2}$.


*In (4) we select the coefficient accordingly.
