This is from an exercise in Bredon's Topology and Geometry:
Let $G$ be a compact topological group (assumed to be Hausdorff). Let $g\in G$ and define $A=\{g^n:n=0,1,2...\}$. Then show that the closure $\bar{A}$ is a topological subgroup.
Note if the assumption of compactness is dropped, then the statement is false. A counterexample is $\mathbb{N}\subset \mathbb{R}$ as additive sets.
Note: if we add the assumption of $G$ being 1st countable, this question is easy to answer.
So, if the set $A$ is finite, then it is a cyclic group and it is already closed. In the infinite case, I can only think of the example of an infinite subgroup of the circle group, which is dense in compact group. I am not sure how to proceed with the proof of this general fact. Any hint will be appreciated.
Here is a proof which assumes that $G$ is first countable. Since $G$ is compact, there is a subsequence $(g^{n_k})_{k\in\Bbb Z_+}$ of $(g^n)_{n\in\Bbb Z_+}$ which converges to some $a\in G$. Clearly, $a$ is in fact an element of $A$. But then the sequence $(g^{n_k-1}a)_{k\in\Bbb Z_+}$ is a sequence of elements of $A$ which converges to $g^{-1}a$. So, $g^{-1}a\in A$. By the same argument, $(\forall N\in\Bbb N):g^{-N}a\in A$. But then $(g^{-n_k-1}a)_{k\in\Bbb Z_+}$ is a sequence of elements of $A$ which converges to $g^{-1}$ and this proves that $g^{-1}\in A$. By the same argument, $(\forall N\in\Bbb N):g^{-N}\in A$. Can you take it from here?
If you drop the assumption that $G$ is first countable, you can still get the conclusion that you want to get, using nets in the proof, as suggested by Eric Wofsey in the comments.