I have the following Taylor series and I don't know how to get to the correct answer. The series is:
$$ \sum_{n=0}^{\infty}p\frac{i^nt^n}{n!},~~p \in \mathbb{R} $$
My reasoning is:
$$ \sum_{n=0}^{\infty}p\frac{i^nt^n}{n!} = p\sum_{n=0}^{\infty}\frac{(it)^n}{n!} = pe^{it} $$
$~$
However, the correct answer is $(1 - p) + pe^{it}$. Would someone please show the correct way of evaluating this series? Thanks.
Edit: Adding Context
Let $X$ be a discrete random variable, all whose moments are given by $E(X^k) = p$, $k = 1, 2, ...$, where $0 < p < 1$. Find the characteristic function of $X$.
My solution:
$$ \varphi_X(t) = \sum_{n=0}^{\infty} \varphi_X^{(n)}(0)\frac{t^n}{n!} = \sum_{n=0}^{\infty}i^nE(X^n)\frac{t^n}{n!} = \sum_{n=0}^{\infty}i^np\frac{t^n}{n!} $$
Your answer is correct.
The book answer you give is for the sum $$1+\sum_{n=1}^{\infty}p\frac{i^nt^n}{n!}.$$
Is there something before this summation which could explain this?