<s>[INST] General term of a sequence. So i have the following sequence:
${1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, ...}$
Where the number $i$ appears $i + 1$ times.
I would like to know the $n$-th term of this sequence. I tried to analise certain patterns within the sequence, but wasn´t able to conclude anything so far. 
 [/INST] I would like to put a "number pyramid" like this:
$$1-1$$
$$2-2-2$$
$$3-3-3-3$$
$$4-4-4-4-4$$
$$5-5-5-5-5-5$$
$$\cdots$$
$$k-\text{th floor: } k-k-k-k-k-...-k-k\text{ ($k+1$ times)}$$
The number of numbers appear in all the floors from $1$ to $k-1$:
$$2+3+4+5+\cdots+k=\dfrac{(k+2)(k-1)}{2}$$
The number of numbers appear in all the floors from $1$ to $k$:
$$2+3+4+5+\cdots+k+k+1=\dfrac{(k+3)k}{2}$$
Assume that the $n$-th term of the sequence above is on the $k$-th floor (the bottom floor of the pyramid above), then $n$ may or may not be the last term of the $k$-th floor, so this inequality must hold (we need to find $k\in\mathbb{Z^+}$ given $n\in\mathbb{Z^+}$):
$\dfrac{(k+2)(k-1)}{2}<n\le\dfrac{(k+3)k}{2}$
$\Leftrightarrow k^2+k-2<2n\le k^2+3k$
$\Leftrightarrow \begin{cases}k^2+k-2n-2<0\\k^2+3k-2n\ge 0\end{cases}$

$$k^2+k-2n-2<0$$

$\Leftrightarrow k^2+2\times k\times 0.5+0.25-2n-2.25<0$
$\Leftrightarrow (k+0.5)^2<2n+2.25$
$\Leftrightarrow k+0.5<\sqrt{2n+2.25}$ (because $k,n>0$)
$\Leftrightarrow k<-0.5+\sqrt{2n+2.25}$
$\Leftrightarrow k<\dfrac{-1+\sqrt{8n+9}}{2}$

$$k^2+3k-2n\ge 0$$

$\Leftrightarrow (k+1.5)^2\ge 2n+2.25$ (similar to above)
$\Leftrightarrow k+1.5\ge \sqrt{2n+2.25}$ (because $k,n>0$)
$\Leftrightarrow k\ge \dfrac{-3+\sqrt{8n+9}}{2}$
Combine both equations, we have
$$\dfrac{-3+\sqrt{8n+9}}{2}\le k<\dfrac{-1+\sqrt{8n+9}}{2}$$
Other notes:


*

*The conclusion above is still true for $n\in\mathbb\{1;2\}$ and $k=1$. When $k=1$, the number of numbers appear in all the floors from $1$ to $0$ is zero (no numbers exist), because when $k=1$ we have $\dfrac{(k+2)(k-1)}{2}=0$.

*There is always exactly one positive integer $k$ satisfy the conclusion above (for all $n\in\mathbb{Z^+}$), because the difference between the right hand side and the left hand side is $1$.
</s>