\[P_{n}\left(\cos\theta_{1}\cos\theta_{2}+\sin\theta_{1}\sin\theta_{2}\cos\phi%
\right)={P_{n}\left(\cos\theta_{1}\right)P_{n}\left(\cos\theta_{2}\right)+2%
\sum_{\ell=1}^{n}\frac{(n-\ell)!\;(n+\ell)!}{2^{2\ell}(n!)^{2}}(\sin\theta_{1}%
)^{\ell}P^{(\ell,\ell)}_{n-\ell}\left(\cos\theta_{1}\right)(\sin\theta_{2})^{%
\ell}P^{(\ell,\ell)}_{n-\ell}\left(\cos\theta_{2}\right)\cos\left(\ell\phi%
\right)}.\]