Construct a homeomorphism whose periodic points set is not closed I'm looking for a simple example in discrete dynamical systems whose periodic points set is not necessary closed.
I've seen some example in websites but they are not that simple and discrete.
Note that :

$(X,f)$ is a Dynamical System if $f:X \to X$ is a homeomorphism and $X$ is a compact metric space.
\begin{align}
Per(f):=\{x \in X ; f^n(x)=x ,\text{ for some } n \in \mathbb{Z}\}
\end{align}

For example I found this example :
Let $X$ be the unit disk $\{z\in\Bbb C: |z|\le 1\}$ and $f:X\to X$, $x\mapsto xe^{|x|i}$. Then $Per(f)=\{x\in X: |x|/\pi\in\Bbb Q\}.$
But It's not discrete and also It's not that simple to me to see why the periodic points is that and why it is not closed.
Could you please help me find a simple example with this property in discrete dynamical systems ?
 A: Answering based on the comments of mine and YCor. This answer is also a duplicate of the answer to the same question on Math.SE.
Consider the space of infinite strings on a finite alphabet (so $\{1,2,\ldots,n\}^{\mathbb{Z}}$), and let $f$ be a shift function, either to the left or to the right. The space is a compact space when endowed with the product topology, and in fact it's a metric space with $d(s_1,s_2) = e^{-|n|}$ where $n$ is the smallest index at which two strings $s_1$ and $s_2$ differ. The set of periodic points for $f$ is clearly a dense space, consisting of all periodic strings. It's also not closed, since any nonperiodic string can be approximated arbitrarily well by a periodic one.
A: There are many simple examples in Hyperbolic Dynamical Systems like Solenoid Attractor, Toral Automorphism, The Geometric Horseshoe of Smale, The Henon Mapp and extra, that have an invariant Hyperbolic set $\Lambda$ for which the periodic points are dense in $\Lambda$. For example, the famouse i think must be $f_A : \frac{\mathbb{R}^2}{\mathbb{Z}^2} \to \frac{\mathbb{R}^2}{\mathbb{Z}^2} $ which is defined by $f_A(\bar{x})= A\bar x$ where:
$$A=\begin{bmatrix} 
    2 & 1  \\
    1 & 1 
    \end{bmatrix}$$
This example can be extended to $\frac{\mathbb{R}^n}{\mathbb{Z}^n}$ for $n\gt 2$ by considering $A\in GL(n, \mathbb{Z})$ with $|\det(A)|=1$ and the condition that no eigenvalue of $A$ lies on $S^1$. Then the peridc points of $f_A$ are dense in $\frac{\mathbb{R}^n}{\mathbb{Z}^n}$.
Actually all the examples that i mentioned above, have a common properti that all of them are topologically conjugate with shift space on $n$ symboles for some $n\ge 2$ on some compact invariant set $\Lambda$. So we may ask the following question:
Question

Is there a continuouse and compact dynamical system $(X,f)$ with non-compact and non-empty set of periodic points which is not topologically conjugate with some shift map on $n$ symbols for some $n\ge 2$?

