Let $T:X\to X$ be a homeomorphism of a topological Hausdorff space $X$. $T$ induces an action of the integers on $Homeo(X)$ by $n\mapsto T^n$. Let $orb(x)=\{T^n(x): x\in X\}$. Fix $N\in\mathbb{N}$. I want to look on a subset of $X$ which is all the points of orbit at most $N$, i.e. $X_{\leq N}=\{x\in X: |orb(x)|\leq N\}$.
Why $X_{\leq N}$ is a closed subset of $X$?
Thoughts: it is enough to show that points with orbit exactly $k$, where $0\leq k\leq N$, is a closed subset. Then $X_{\leq N}$ is a finite union of those. For example, if I want to show that $X_{=2}$ is closed then it does not necessarily coincide with the set of points of period $2$, i.e. $T^2(x)=x$, because those can have orbits of length $3$: $\{T^{-1}(x), x, T(x)\}$ and it does not intersect with points of period $1$, because they all have orbits of length $1$. So how can I describe it in terms of periodicity?
$x \in X_{\leq N}$ if and only if $T^{k}(x)=x$ for some $k \in {1,2,...,N}$. So $X_{\leq N}$ is the union of the closed sets $\{x:T^{k}(x)=k\}$ over $k\leq N$.