Let me assume that your problem is really the following one:
Find every family of numbers $(P(n,r))_{n\geqslant1,r\geqslant0}$ such that, for every $n\geqslant1$, $m\geqslant1$ and $r\geqslant0$, $P(n,0)=P(1,r)=1$ and $ P(n+m,r)=\sum_{s=0}^rP(n,s)P(m,r-s). $
A method to solve this is to introduce, for each $n\geqslant1$, the formal series $Q_n(x)$ defined by $ Q_n(x)=\sum_{r=0}^{+\infty}P(n,r)x^r, $ for some parameter $x$, and to use these objects as follows:
- Identify $Q_1(x)$.
- Translate the recursion above into a relation between every $Q_{n+m}(x)$, $Q_n(x)$ and $Q_m(x)$.
- Deduce from 1. and 2. an explicit formula for every $Q_n(x)$.
- Deduce from 3. the value of every $P(n,r)$.
Now, shoot...
Edit: For different initial conditions such as $P(n,0)=1$ and $P(1,r)=\cos(r)$, the method stays exactly as described above, only the result of step 1. changes and the feasability of step 4. is lessened. In this specific case, one gets $ \sum\limits_{r=0}^{+\infty}P(n,r)x^r=\left(\frac{1-x\cos 1}{1-2x\cos 1+x^2}\right)^n. $ To see this, note that $P(1,r)$ is the real part of $\mathrm e^{\mathrm i r}$, hence $Q_1(x)$ is the real part of $ \sum\limits_{r=0}^{+\infty}\mathrm e^{\mathrm i r}x^r=\frac1{1-x\mathrm e^{\mathrm i}}=\frac{1-x\mathrm e^{-\mathrm i}}{|1-x\mathrm e^{\mathrm i}|^2}=\frac{1-x\cos1+\mathrm ix\sin1}{1-2x\cos 1+x^2}. $