How to define a sequence with an infinite amount of each natural number? I was trying to create a sequence such that for every $x \in \mathbb{N}$, that sequence has a subsequence that converges to $x$. 
Basically I came up with the sequence that has each natural number an infinite amount of times. Now I am having trouble defining it. Any help?
 A: How about just:
$$ a_n=1,1,2,1,2,3,1,2,3,4,1,2,3,4,5,\ldots$$
Clearly each natural number appears an infinite amount of times, so you can extract a subsequence converging to whichever natural number you want.
A: Your sequence is straightforward enough that unless you have to produce an algorithm, a simple verbal description is the best approach if you want something more detailed than a simple illustration of the sequence, as in ASKASK’s answer. You could, for instance, say something like this:

We’ll define the sequence in blocks. The first block has one term, $1$. The second block has two terms, $1$ and $2$ in that order. And in general for each $k\in\Bbb Z^+$ the $k$-th block consists of the integers $1$ through $k$ in that order. Thus, the sequence is $$\langle 1,\color{red}{1,2},1,2,3,\color{red}{1,2,3,4},1,2,3,4,5,\color{red}1\ldots\rangle\;,$$ where I’ve colored the blocks alternately black and red to make them stand out.

This is a perfectly clear description of the sequence. If you want an algorithm that outputs $a_n$ when you input $n$, you have to work a lot harder. Here’s one way to dig one out.
Things are a little simpler if we index the terms starting with $0$, so that $a_0=1$, $a_1=1$, $a_2=2$, $a_3=1$, and so on. Now look at the values of $n$ for which $a_n=1$: $0,1,3,6,10,15,\ldots\;$. These are the indices at which the successive blocks begin. The first block is just $a_0$; the second is $a_1,a_2$; the third is $a_3,a_4,a_5$; and so on.
If you think about it a bit, it should be clear that these numbers are just the sums of consecutive integers: $0$, $0+1=1$, $0+1+2=3$, etc. You may know the formula for such sums:
$$0+1+2+\ldots+k=\frac12k(k+1)\;;$$
call this number $t_k$. The $k$ terms $a_{t_{k-1}},a_{t_{k-1}+1},\ldots,a_{t_k-1}$ make up the $k$-th block, which looks like $1,2,\ldots,k$. Thus, if $t_{k-1}\le n<t_k$, then $a_n=n-t_{k-1}+1$. In order to express $a_n$ in terms of $n$, therefore, we just need to figure out how to express $k$ in terms of $n$.
Now $t_{k-1}\le n<t_k$ if and only if
$$\frac12k(k-1)\le n<\frac12k(k+1)\,$$
i.e.,
$$k^2-k\le 2n<k^2+k\;.$$
We can complete the squares to write this as
$$\left(k-\frac12\right)^2-\frac14\le 2n<\left(k+\frac12\right)^2-\frac14$$
and hence
$$k-\frac12\le\sqrt{2n+\frac14}<k+\frac12\;.$$
Solving for $k$, we find that
$$\sqrt{2n+\frac14}-\frac12<k\le\sqrt{2n+\frac14}+\frac12\;,$$
which says that $k$ is the largest integer less than or equal to $\sqrt{2n+\frac14}+\frac12$:
$$k=\left\lfloor\sqrt{2n+\frac14}+\frac12\right\rfloor\;.\tag{1}$$
Summing up, for any non-negative integer $n$ we have $t_{k-1}\le n<t_k$ precisely when $k$ is given by the formula $(1)$, and then we have
$$\begin{align*}
a_n&=n-t_{k-1}+1\\
&=n-\frac12\left\lfloor\sqrt{2n+\frac14}+\frac12\right\rfloor\left(\left\lfloor\sqrt{2n+\frac14}+\frac12\right\rfloor-1\right)+1\\
&=n-\frac12\left\lfloor\sqrt{2n+\frac14}+\frac12\right\rfloor\cdot\left\lfloor\sqrt{2n+\frac14}-\frac12\right\rfloor+1
\end{align*}$$
As a quick sanity check, this says that
$$\begin{align*}
a_9&=9-\frac12\left\lfloor\sqrt{\frac{73}4}+\frac12\right\rfloor\cdot\left\lfloor\sqrt{\frac{73}4}-\frac12\right\rfloor+1\\
&=10-\frac12\left\lfloor\frac{\sqrt{73}+1}2\right\rfloor\left\lfloor\frac{\sqrt{73}-1}2\right\rfloor\\
&=10-\frac12\cdot4\cdot3\\
&=4\;,
\end{align*}$$
which is indeed correct.
A: One general way to create a sequence with an infinite number of accumulation points
 is to write a table of your sequence and read it by anti-diagonals. An intuitive way of looking at your problem is to write down the sequence in this form:
$$
1,\\
1,2,\\
1,2,3,\\
1,2,3,4,\\
\vdots \vdots
$$
A: How about the sequence of disks you move in the Tower of Hanoi puzzle?
1 2 1 3 1 2 1 4 1 2 1 3 1 ...
$a_n = k$ when n is $2^{k-1}$ times an odd number.
