I need to find the moment generating function and $E(x)$ for the function where the pdf of x for ranges
$x\geq 1$ is $ap^x$ but $P(X=0)=1-\sum_1^\infty ap^x$
so when you add them together you get $P(X=x)=1-\sum_2^\infty ap^x$
In order to find the mgf I need to $\sum_0^\infty e^{tx}(1-\sum_2^\infty ap^x)$
I cant seem to get past this point for the mgf which would lead me to the expected value.
If I am interpreting the description correctly, $X$ is a random variable that takes on values $0,1,2,3,\dots$. For $n\ge 1$ we have $\Pr(X=n)=ap^n$, while $\Pr(X=0)=1-\sum_1^\infty ap^n$. So $\Pr(X=0)=1-\frac{ap}{1-p}$ (sum of geometric series).
Note that the information we are given does not identify $a$ even when we know $p$. But let us continue.
We want $E(e^{tX})$. When $n=0$, we have $e^{tX}=1$. This gives a contribution of $$1-\frac{ap}{1-p}\tag{1}$$ to the mgf.
For the rest, we want $\sum_{n=1}^\infty e^{tn}ap^n$. This sum is an infinite geometric series with first term $ae^tp$ and common ratio $e^tp$. The sum is $$\frac{ae^tp}{1-e^tp}.\tag{2}$$
Finally, add Terms (1) and (2).
For finding $E(X)$ we do not even need Term 1, since it is a constant. Differentiate Term 2, and set $t=0$.