Let $X_i \sim Ber(0.5)$ and $X_i$'s independent. Let $Y$ be a random variable with the same distribution as $\sum_{i=1}^n iX_i$. Determine the moment generating function of $Y$.
I figured the moment generating function of $iX_i$ would be $$M_{iX_i}(t) = 0.5e^{ti(0)}+0.5e^{ti(1)} = 0.5(1+e^{ti})$$
Now we could use that the $X_i$'s are independent and get $$M_{Y}(t) = M_{\sum_{i=1}^n iX_i}(t) = \prod_{i=1}^n M_{iX_i}(t)$$ $$ =0.5\prod_{i=1}^n 1+e^{ti}$$
I'm not sure if $M_{Y}(t) = M_{\sum_{i=1}^n iX_i}(t) = \prod_{i=1}^n M_{iX_i}(t)$ this step is correct. Any hint in the right direction is appreciated :)
$0.5$ gets multiplied $n$ times, so the answer is $(0.5)^{n} \prod\limits_{i=1}^{n} (1+e^{it})$