# Sequence with $\mathbb N$ as set of limit points

A friend of mine challenged me to find a sequence such that the set of its limit points is exactly $\mathbb N$.

Do you have any idea?

-

$1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5 \ldots$ I suppose you get the idea
you ommitted $0$ but that's fine. +1 – LeGrandDODOM May 10 '14 at 11:58
I did this on purpose, to me $0$ is not natural, but that's just a question of one's personal taste ;) – mm-aops May 10 '14 at 11:59
Formalizing: $$a_n=n+1-\frac{k(k+1)}{2},$$with $$k=\lfloor\frac{\sqrt{8n+1}-1}{2}\rfloor.$$ – enzotib May 10 '14 at 12:26
How did $\sqrt{8n+1}$ appear? – Berci May 10 '14 at 12:35
If $U \subset \Bbb{R}$, then isn't a limit point of $U$ a point $x \in \Bbb{R}$ such that given any deleted neighborhood $N \subset \Bbb{R}$ around $x$, $N \cap U \neq \varnothing$? If so, then the answer above has no limit points; though it does have convergent subsequences. – Tom May 10 '14 at 12:48
$0-\frac12,0-\frac13,1-\frac13,0-\frac14,1-\frac14,2-\frac14,...$ has the set of nonnegative integers as the set of limit points.