Let $\Omega$ be a topological space and $\tau:\Omega\to\Omega$. $A\subseteq\Omega$ is called stable if for every neighborhood $V$ of $A$, there is a neigheiborhood $U$ of $A$ with $$\tau^n(U)\subseteq V\;\;\;\text{for all }n\in\mathbb N_0\tag1.$$ $A$ is called attractor if $A$ is
- forward invariant, i.e. $A=\tau(A)$;
- stable; and
- there is a neighborhood $U_0$ of $A$ with $U_0\subseteq E(A)$,
where $E(A)$ is the set of all $x\in\Omega$ for which the orbit $$\operatorname{orb}x:\mathbb N_0\to\Omega\;,\;\;\;n\mapsto\tau^n(x)$$ is eventually in every neighborhood of $A$.
Now consider $$g:[0,1]\to[0,1]\;,\;\;\;x\mapsto\begin{cases}\displaystyle x\left(1-\sin^2\frac\pi x\right)&\text{, if }x\ne0\\0&\text{, otherwise}.\end{cases}$$
How can we show that $A:=\{0\}$ is stable, but not an attractor, and $A_n:=[0,1/n]$ is an attractor for every $n\in\mathbb N$?
I'm not sure how we see that $A$ is stable, but not an attractor, but we it's easy to see that $1/n$ is a fixed point of $g$ for every $n\in\mathbb N$, which might be crucial ...
Your hunch is correct. Every neighborhood $_0$ of $$ contains some fixpoint $1/n$, and those points are not in $E(A)$, so condition 3 is violated.