
A simple Sequence
Question: Find a formula for the sequence in terms of "n"
{5,1,5,1,5,1,...}
This sequence looks pretty straight forward, I mean its easy see the pattern. However, I just cant seem to come up with a formula that would work for any number "n". This is is bugging me...lol
thanks, matt

$\displaystyle a_n = 3  2(1)^n$

After posting that answer, I saw that we can generalize this as a rule :)
$\displaystyle a_n = {a,b,a,b,a,b,....}$
$\displaystyle a_n = \frac{a+b}{2}  \frac{ab}{2}(1)^n$