# 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

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

where $\displaystyle 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.
$\displaystyle C_n = \left\lceil {\frac{{\sqrt {8n + 1} - 1}}{2}} \right\rceil$
That is the ceiling function.
The 'change' come on the triangular numbers: $\displaystyle \frac {n(n+1)}{2}$.

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

instead of $\displaystyle C_n = \left\lceil {\frac{{\sqrt {8n + 1} - 1}}{2}} \right\rceil$
because it is not exactly the same (if I am not mistaken)
$\displaystyle C_n = 1, 1, 2, 2, 2, 3, 3, 3, 3 ...$
$\displaystyle 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
$\displaystyle \sum_{j=1}^{k}j = \frac{k(k+1)}{2}$

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

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

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

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

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

There is only one integer k satisfying these inequations because

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