TITLE: Is there a subset of R such that its Cantor-Bendixson rank is the first limit ordinal?
QUESTION [7 upvotes]: I'm looking for a set $A \subset \mathbb{R}$ such that $\bigcap^\infty_{n=0} A^{(n)} $ is a perfect set (i.e $X'=X$) but $\forall n \in \mathbb{N}$ the set $A^{(n)}$ isn't perfect (where $X^{(n)}=(X^{(n-1)})'$ and $X^{(0)}=X$).

REPLY [5 votes]: Yes. For every countable ordinal we can find a set of real numbers whose Cantor-Bendixson rank is that ordinal.
To see this, first note that every countable ordinal embeds (order-wise, and thus topologically wise) into the rational numbers, and so into the real numbers. So it suffices to find an ordinal whose rank is $\omega$.
What does that mean? It means that it takes $\omega$ steps to remove all the points (since countable ordinals can't have a non-empty kernel). If $\omega$ has rank $1$ and $\omega^2$ has rank $2$, and so on, then $\omega^\omega$ has rank $\omega$ (note: this is ordinal exponentiation!).
If you want something with a non-empty kernel, pick an embedding of $\omega^\omega$ into $[0,1]$, say $S$ and take $S\cup[2,3]$ to be your set.