In Erdős and Renyi's 1959 paper On random graphs I , I'm trying to reproduce, starting from Eq.\eqref{1} in their paper, the two inequalities that appear in Eq.\eqref{2}.
Eq.\eqref{1} is: $$ P \le \sum_{s=2}^{\log \log n}{n \choose s} \left[\sum_{r=1}^{{s \choose 2}} { {s \choose 2} \choose r} {\frac {\dbinom{n-s \choose 2} {N_{c}-r}} {\dbinom{n \choose 2} {N_{c}}} }\right] \label{1}\tag{19} $$
where $n$ is the total number of nodes in the graph, and $$N_c = \left\lfloor{\frac 1 2} n \log n +cn\right\rfloor$$ where $c$ is a real number. $P$ is the probability of a certain class of graphs occurring under constraints provided in the paper (details not needed here). The summation variable $r$ represents the number of edges in a subset of $s$ nodes, and so $r$ is summing over all such possible (nonzero) values, from 1 to its maximum value which is the combination $C(s,2)$. Ultimately, the limit $n \rightarrow \infty$ will be needed since the asymptotic behavior is being investigated.
From Eq.\eqref{1} I'd like to reproduce Eq.\eqref{2} in the paper, which is:
$$P \le {\frac {\log n} n} \sum_{s=2}^{\log \log n} {\frac {2^{s \choose 2} e^{-2sc}} {s!}} \le {\frac {e^{e^{-2c}}e^{{\frac 1 2}(\log \log n)^2}} n}. \label{2}\tag{20}$$
A) Going from \eqref{1} to the middle expression in \eqref{2}
In \eqref{1}, since we need an upper bound, I proceeded by replacing the second combination term in the $r$ sum (i.e. the one in the numerator) by its maximum value and factoring it out of the sum, and starting the sum from 0, which yields: $$\sum_{r=1}^{{s \choose 2}} { {s \choose 2} \choose r} {\dbinom{n-s \choose 2} {N_{c}-r}} \le \max_{r}{\dbinom{n-s \choose 2} {N_{c}-r}}\sum_{r=0}^{{s \choose 2}} { {s \choose 2} \choose r} = \max_{r}{\dbinom{n-s \choose 2} {N_{c}-r}}2^{\binom{s}{2}} $$ where the equality follows from a standard binomial sum, and reproduces the factor $2^{s \choose 2}$ which is in the middle expression in \eqref{2}. I have tried other approximations, but only this one readily leads me to the factor $2^{s \choose 2}$. For the $\max$, the upper argument varies as $n^2$, the lower as $N_{c} \sim n \log n$, so as $n$ increases without bound the true maximum of this combinatorial term (obtained if the lower arg is roughly half the upper) cannot be obtained, but it comes closest to the maximum when $r=0$ (making the lower arg as large as possible, yet still less than half the upper), so \eqref{1} now becomes:
$$P \le {\frac {1} {\dbinom{n \choose 2} {N_{c}}} }\sum_{s=2}^{\log \log n}{n \choose s} 2^{{s}\choose {2}} {\dbinom{n-s \choose 2} {N_{c}}}. \label{3}\tag{19${}'$} $$ From here, I'm not reproducing the term $\exp(-2sc)$ in \eqref{2}: The factor of $c$ in the exponential is in the definition of $N_{c}$ (see above), but I find that the exponentials from applying Stirling's approximation to \eqref{3} contain terms of the form $\exp(-nc)$ (with $n$ instead of $s$) but they cancel (numerator and denominator). The other (non-exponential) terms from Stirling appear to cancel for large $n$. I'm also not obtaining the factor of $(\log n)/n$ in \eqref{2}. Would appreciate any thoughts on getting to the middle expression of \eqref{2}.
B) Going from the middle expression in \eqref{2} to the rightmost expression in \eqref{2}
Most of the right side is reproducible as follows. Considering the following factor (middle expression of \eqref{2}): $$2^{s \choose 2} \lt e^{s \choose 2} = e^{\frac {s(s-1)}{2}} \lt e^{\frac {s^2}{2}}$$
and evaluating $s$ in this expression at its max value of $\log \log n$ produces one of the terms on the right of \eqref{2}. And carrying out the sum on the remaining $s$-dependent factors, $\exp(-2sc)/s!$, and summing from 0 to $\infty$, yields $\exp (\exp(-2c) )$, also on the right side of \eqref{2}. But I'm not capturing the factor that cancels the $\log n$ factor.
Any thoughts greatly appreciated.
I should add that there is another post on (a slightly different set of) Erdős–Rényi inequalities, but it doesn't address the form of the upper bounds. It looks at ratios of successive terms in the series and part of the upper bound (taken as given) actually drops out. I'm asking about the derivation of the form itself.