I was trying to calculate a probability that includes an infinite possibility of events, and the overall probability is expressed by the following formula :
$$P(p) = \sum_{n=0}^{\infty} \frac{(2n)!}{n!(n+1)!} \cdot p^n (1-p)^n = \sum_{n=0}^{\infty} P_n $$ where $p$ is a probability of an specific event and $p \in ]0,1[$.
I used the ratio test and checked that the sum converges for any $p$ of my interest (except for $p=0.5$, where the test is inconclusive). I then tried to get a simpler formula for $P$ that does not involve a sum, as is sometimes possible.
I tried to use the derivative, so I could get something like an ODE, like one can do the sum $e^x$. So
$$P' = \sum_{n=1}^{\infty} \frac{(2n)!}{n!(n+1)!} \cdot n \cdot(1-2p)\cdot p^{n-1}(1-p)^{n-1} = \frac{1-2p}{p(1-p)} \cdot \sum_{n=0}^{\infty} nP_n$$
I tried to express it in function of $P_{n-1}$.
$$P' = (1-2p) \sum_{n=1}^{\infty} \frac{(2n)(2n-1)}{(n+1)n} \cdot \frac{(2(n-1))!}{(n-1)!n!} \cdot n \cdot p^{n-1}(1-p)^{n-1} $$
$$P' = (1-2p) \sum_{n=1}^{\infty} \frac{(4n^2-2n)}{(n+1)} \cdot P_{n-1}$$ $$P' = (1-2p) \sum_{n=0}^{\infty} \frac{(4n^2+6n+2)}{(n+2)} \cdot P_{n}$$
Here I can do a polynomial division, it gives me $4n-2 + 6/(n+2)$
$$P' = (1-2p) \sum_{n=0}^{\infty} \left(4n -2 +\frac{6}{n+2}\right) \cdot P_{n}$$
$$P' = (1-2p) \left[4 \left(\sum_{n=0}^{\infty} nP_n\right) - 2 P + 6 \left( \sum_{n=0}^{\infty} \frac{P_n}{n+2}\right)\right]$$
$$P' = (1-2p) \left[4 \cdot \frac{p(1-p)}{1-2p} \cdot P' - 2 P + 6 \left( \sum_{n=0}^{\infty} \frac{P_n}{n+2}\right)\right]$$
$$[1 - 4p(1-p)]P' = -(2-4p)P + (6-12p) \left( \sum_{n=0}^{\infty} \frac{P_n}{n+2}\right)$$
The expression is already a bit complicated and I don't know how to work with $P_n/(n+2)$. In addition I verified Wolfram Alpha and it gives the following simplification, but with no explanation:
$$P = \frac{|2p-1| - 1}{2(p-1)}$$
Do you suggest something I can do to obtain the previous expression ? Is my approach any good and should I try to go further ? If so how can I work with $P_n/(n+2) ?$
And finally, is there any other way to get the general expression of a power series other than using the derivative?
Thank you.