# Thread: General Formula For Sequence

1. ## General Formula For Sequence

Find the general formula (for the nth term) for the sequence

{5,1,5,1,5,1,...}

assuming the pattern continues.

I've tried a lot of things but can't come up with a solution...it seems innocent enough. It seems like the formula should depend on n being even or odd but I can't get anything to work. A suggestion would be appreciated. Is there a specific way to solve these or are you supposed to just spot the pattern. Thanks.

2. Originally Posted by vReaction Find the general formula (for the nth term) for the sequence

{5,1,5,1,5,1,...}

assuming the pattern continues.

I've tried a lot of things but can't come up with a solution...it seems innocent enough. It seems like the formula should depend on n being even or odd but I can't get anything to work. A suggestion would be appreciated. Is there a specific way to solve these or are you supposed to just spot the pattern. Thanks.

$\displaystyle a_n=\left\{\begin{array}{ll}5&,\,if\,\,\,n\,\,\,is \,\,\,odd\\1&,\,if\,\,\,n\,\,\,is\,\,\,even\end{ar ray}\right.$

Tonio

3. Originally Posted by vReaction Find the general formula (for the nth term) for the sequence {5,1,5,1,5,1,...}, assuming the pattern continues.
Try $\displaystyle x_n=5\cdot \text{mod}(n,2)+\text{mod}(n+1,2)$.

4. Tonio: Thanks...I didn't think it'd be that simple.

Plato: I'm unfamiliar with "mod"...I searched and only found modular arithmetic which looked very confusing. Thanks though.

5. Originally Posted by vReaction : I'm unfamiliar with "mod"...I searched and only found modular arithmetic which looked very confusing.
It is not confusing at all.
$\displaystyle \text{mod}(j,k)$ is the remainder when $\displaystyle j$ is divided by $\displaystyle k$.
So $\displaystyle \text{mod}(3,2)=1$ and $\displaystyle \text{mod}(4,2)=0$

$\displaystyle \text{mod}(5,3)=2$ and $\displaystyle \text{mod}(12,6)=0$

6. Hello, vReaction!

Find the $\displaystyle n^{th}$ term for the sequence: .$\displaystyle 5,1,5,1,5,1\:\hdots$

The sequence is: .$\displaystyle (3+2),\;(3-2),\;(3+2),\;(3-2),\;\hdots$

Therefore: .$\displaystyle a_n \;=\;3 - (\text{-}1)^n\!\cdot\!2$

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Consider these two functions:

. . $\displaystyle \frac{1-(\text{-}1)^n}{2} \;=\;\begin{Bmatrix}1 & n \text{ odd} \\ 0 & n\text{ even} \end{Bmatrix}$

. . $\displaystyle \frac{1+(\text{-}1)^n}{2} \;=\;\begin{Bmatrix} 0 & n\text{ odd} \\ 1 & n\text{ even} \end{Bmatrix}$

Given the sequence: .$\displaystyle A,B,A,B,A,B\:\hdots$

. . then: .$\displaystyle a_n \;\;=\;\;\frac{1-(\text{-}1)^n}{2}\cdot A \:+\: \frac{1+(\text{-}1)^n}{2}\cdot B$

#### Search Tags

formula, general, sequence 