# Thread: Sequence and series help

1. ## Sequence and series help

how would i find the function? The series is 1,2,2,3,3,3,4,4,4,4 and so on with there being n number of the term n. How would i make a function to find the nth term?

Grateful for help.

2. You can try

$u_n = -E(\frac{1-\sqrt{8n+1}}{2})$

where $k \leq E(k) < k+1$

If needed I can provide you the way I found this function

3. ## How?

Yes, I want to know how you got it.

4. Originally Posted by sethu1989
Yes, I want to know how you got it.
$C_n = \left\lceil {\frac{{\sqrt {8n + 1} - 1}}{2}} \right\rceil$
That is the ceiling function.
The 'change' come on the triangular numbers: $\frac {n(n+1)}{2}$.

5. Originally Posted by Plato
$C_n = \left\lceil {\frac{{\sqrt {8n + 1} - 1}}{2}} \right\rceil$
That is the ceiling function.
The 'change' come on the triangular numbers: $\frac {n(n+1)}{2}$.
Thanks !
I have never heard of this 'ceiling function' before
I found it by myself
I took $D_n = -\left\lceil {\frac{1 - {\sqrt {8n + 1}}}{2}} \right\rceil$

instead of $C_n = \left\lceil {\frac{{\sqrt {8n + 1} - 1}}{2}} \right\rceil$
because it is not exactly the same (if I am not mistaken)
$C_n = 1, 1, 2, 2, 2, 3, 3, 3, 3 ...$
$D_n = 1,2, 2, 3, 3, 3, ...$

6. Originally Posted by sethu1989
Yes, I want to know how you got it.
Not knowing the 'ceiling function' here is how I got it
First you have to know that
$\sum_{j=1}^{k}j = \frac{k(k+1)}{2}$

$u_n = k$ for every n integer such as $\frac{(k-1)k}{2} < n \leq \frac{k(k+1)}{2}$

n being given, to find k you must have both inequations
$(k-1)k - 2n < 0$ and $k(k+1) - 2n \geq 0$

$k^2 - k - 2n$ and $k^2 + k - 2n$ are parabolas with the same discriminant 8n+1

$k^2 - k - 2n < 0$ for $k < \frac{1+\sqrt{8n + 1}}{2}$
$k^2 + k - 2n \geq 0$ for $k \geq \frac{-1+\sqrt{8n + 1}}{2}$

Therefore $\frac{-1+\sqrt{8n + 1}}{2} \leq k < \frac{1+\sqrt{8n + 1}}{2}$

There is only one integer k satisfying these inequations because

$\frac{1+\sqrt{8n + 1}}{2} - \frac{-1+\sqrt{8n + 1}}{2} = 1$