The "replica trick" initial formula?
I realize this thread is old, but I was also reading the "for Pedestrians" introduction and I had the same question. Although the above response seems reasonable, it does not address the original question. However, using a very similar approach, it is possible to derive (1) from (2).
Let's start from the right hand side of (1):
$$F = \lim_{n \rightarrow 0} \frac{1}{n} \log \left( \overline{Z^n} \right),$$
where the overbar denotes average over the quenched disorder. Rewriting (2), we have:
$$Z^n \simeq 1 + n \log Z$$
Inserting into the above expression for $F$ and using the fact that $\overline{1} = 1$, we have:
$$F = \lim_{n \rightarrow 0} \frac{1}{n} \log \left( 1 + n \overline { \log Z } \right)$$
Since $n$ is small, we can expand the outer logarithm around $1$ and find:
$$F = \overline{ \log Z }$$
which is the left hand side of (1). This answer was inspired by "Spin Glass Theory and Beyond" by Mezard, Parisi and Virasoro, which I've found to be a very useful resource for this topic.
Try to look at Introduction to the Replica Theory of Disordered Statistical Systems by V. Dotsenko. In the following, I've written a possible answer to your question:
\begin{equation} f=-\lim_{N\rightarrow\infty}\frac{1}{\beta N}\mathbb{E}\left[\ln Z_{J}\right] \end{equation}
where:
- $\mathbb{E}\left[\mathcal{O}\right]=\left(\prod_{\left\{ i,j\right\} }\int dJ_{ij}\right)P\left[J\right]\mathcal{O} $
- $Z_{J}=\sum_{\sigma}e^{-\beta H\left[J,\sigma\right]} $
Then labelling with $a$ the replicas: \begin{equation} Z_{J}^{n}=\left(\prod_{a=1}^{n}\sum_{\sigma^{a}}\right)e^{-\beta\sum_{a=1}^{n}H\left[J,\sigma_{a}\right]} \end{equation} Thus, remember that $\ln x=\lim_{n\rightarrow0}\frac{1}{n}\left(x^{n}-1\right)$: \begin{equation} f=-\lim_{N\rightarrow\infty}\frac{1}{\beta N}\mathbb{E}\left[\ln\left(Z_{J}\right)\right]=-\lim_{N\rightarrow\infty}\lim_{n\rightarrow0}\frac{1}{\beta N}\mathbb{E}\left[\frac{\left(Z_{J}^{n}-1\right)}{n}\right]=-\lim_{N\rightarrow\infty}\lim_{n\rightarrow0}\frac{1}{\beta nN}\mathbb{E}\left[Z_{J}^{n}\right] \end{equation} but in general there are many issues concerning the commutation of the two limits.
For an even more direct answer to how the two replica tricks you listed are related, simply note that we expect $Z^n \rightarrow 1$ as $n \rightarrow 0$. Then,
$$ \lim_{n \rightarrow 0} \frac{1}{n} \log \overline{Z^n} = \lim_{n \rightarrow 0} \frac{1}{n} \log \Big( 1 + (\overline{Z^n} - 1) \Big) = \lim_{n \rightarrow 0} \frac{\overline{Z^n} - 1}{n} = \overline{\log Z}$$