Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Noticing that $cosh(\alpha)=\frac{1}{2}(e^{\alpha}+e^{-\alpha})$ and $p(c_n)=p(c_n=1)+p(c_n=-1)=\frac{1}{1+e^{\lambda_n}}(e^{\lambda_n/2}+e^{-\lambda_n/2})$ solves the problem. The normalization term $(2/(1+e^{\lambda_n}))^N$ is missing, though.