# Finding The General Term Of A Sequence

Let there be a sequence $1,1,2,2,3,3,4,4,...$ find the general term of the sequence

I manage to find a general terms for the elements in the even and odd places, but did find a connection:
$a_{even}=\frac{n}{2}$, $a_{odd}=\frac{n+1}{2}$

• Edited typo in my answer. Apr 1, 2015 at 15:06

Build the differences: $$\begin{array}{l} {a_2} - {a_1} = 0 = \frac{{{{( - 1)}^1} + 1}}{2}\\ {a_3} - {a_2} = 1 = \frac{{{{( - 1)}^2} + 1}}{2}\\ {a_4} - {a_3} = 0 = \frac{{{{( - 1)}^3} + 1}}{2}\\ {a_5} - {a_4} = 1 = \frac{{{{( - 1)}^4} + 1}}{2}\\ \vdots \\ {a_n} - {a_{n - 1}} = \frac{{{{( - 1)}^{n - 1}} + 1}}{2} \end{array}$$ and add them: $${a_n} - {a_1} = \sum\limits_{k = 1}^{n - 1} {\frac{{{{( - 1)}^{k}} + 1}}{2}}$$ That is: $${a_n} = 1 + \sum\limits_{k = 1}^{n - 1} {\frac{{{{( - 1)}^{k}} + 1}}{2}}$$ Because: $$1 + \sum\limits_{k = 1}^{n - 1} {\frac{{{{( - 1)}^{k}} + 1}}{2}} = \frac{1}{4}\left( {2n - {{( - 1)}^{n}} +1} \right)$$ we have: $${a_n} = \frac{1}{4}\left( {2n - {{( - 1)}^{n}} +1} \right)$$ Voila!
• for n=1 I get $\frac{1}{4}(2+1-3)=0$
How about $$a_n = \left \lfloor \frac{n+1}{2} \right \rfloor$$