How could one go about constructing the set $\{\emptyset, \{\emptyset\}, \{\{\emptyset\}\}, \{\{\{\emptyset\}\}\}, ...\}$ in ZFC? I feel I should first show that $\omega$ exists using the axiom of infinity, and then I should use the axiom of replacement to map it to this set, but I'm unable to think of a first-order formula that I can use as the definable function for replacement. In particular, I'm having trouble with "counting the depth" in a finite sized first-order formula.
Thanks in advance.
 A: Short answer: Let $F(x)=\{x\}$. By recursion, there exists a unique function $G$ with domain $\omega$ such that $G(0)=\emptyset$ and $G(n+1)=F(G(n))$ for every $n\in\omega$. This uses Replacement. Then $\bigcup \text{ran} (G)$ is the set you want (this also uses Replacement). 
Long answer: What follows is just an unwinding of the usual proof of the recursion theorem for this particular case. Let $\psi(n,h)$ be the statement 
$$
n\in \omega \wedge \text{fun}(h) \wedge \text{dom}(h)=n \wedge [0<n \to h(0)=\emptyset] \wedge \forall i \left[i<n-1 \to h(i+1)=\{h(i)\}\right]
$$
Here, $\text{fun}(x)$ is a formula (in the language of set theory) with one free variable which asserts that $x$ is a function.
You can prove by induction that  $\forall n\in \omega \exists ! h \psi(h,n)$. By Replacement, we can define a function $n\mapsto h_n$ which sends each $n\in\omega$ to the unique $h_n$ such that $\psi(n,h_n)$. 
A further inductive argument shows that $n<m<\omega$ implies $\psi(n,h_m\upharpoonright n)$, i.e. $h_n=h_m\upharpoonright n$. But then $\bigcup \{h_n: n< \omega\}$ (which is a set by Replacement) is a function with domain $\omega$, moreover it is the function which I called $G$ above. once again, $\text{ran} (G)$ works. 
