# Thread: Help with a sequence

1. ## Help with a sequence

I'm trying to create a formula for this sequence and just can't figure it out:

{ 1/1, 1/3, 1/2, 1/4, 1/3, 1/5, 1/4, 1/6, ... }

Any ideas?

2. Originally Posted by mxrider530
I'm trying to create a formula for this sequence and just can't figure it out:

{ 1/1, 1/3, 1/2, 1/4, 1/3, 1/5, 1/4, 1/6, ... }

Any ideas?
$a_n=\left\{\begin{array}{lr}\frac{2}{n+1}&:n~odd\\ \frac{2}{n+4}&:n~even\end{array}\right\}$, $n\in\{1,2,3,...\}$

3. Hello, mxrider530!

This is a wicked problem!

Find a formula for this sequence: . $\frac{1}{1},\;\frac{1}{3},\;\frac{1}{2},\; \frac{1}{4},\; \frac{1}{3},\; \frac{1}{5},\; \frac{1}{4},\; \frac{1}{6},\;\hdots$
I examined the denominators, $d.$

. . $\begin{array}{c|cccccccccc}
n & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline
d & 1 & 3 & 2 & 4 & 3 & 5 & 4 & 6 & 5 & 7 \end{array}$

I considered the denominators for odd $n$ and for even $n.$

$\begin{array}{c|ccccc}
\text{odd }n & 1 & 3 & 5 & 7 & 9 \\ \hline
d & 1 & 2 & 3 & 4 & 5 \end{array}$

. . If $n$ is odd, add 1 and divide by 2: . $d \:=\:\frac{n+1}{2}$ .[1]

$\begin{array}{c|ccccc}
\text{even }n & 2 & 4 & 6 & 8 & 10 \\ \hline
d & 3 & 4 & 5 & 6 & 7 \end{array}$

. . If $n$ is even, divide by 2 and add 2: . $d \:=\:\frac{n}{2}+2 \:=\:\frac{n+4}{2}$ .[2]

How can we alternate between the two formulas: .[1] and [2] ?

. . Multiply [1] by: . $\frac{1-(\text{-}1)^n}{2}\quad\hdots$ multiply [2] by: . $\frac{1 + (\text{-}1)^n}{2} \quad\hdots$ and add the results.

We have: . $d \;=\;\frac{1-(\text{-}1)^n}{2}\left(\frac{n+1}{2}\right) + \frac{1+(\text{-}1)^n}{2}\left(\frac{n+4}{2}\right)$

. . This simplifies to: . $d \;=\;\frac{2n+5 + (\text{-}1)^n\cdot3}{4}$

$\text{Hence, the }n^{th}\text{ fraction is: }\;\;\frac{1}{\dfrac{2n+5 + (\text{-}1)^n\cdot 3}{4}}$

. . Therefore: . $\boxed{f(n) \;=\;\frac{4}{2n+5 + (\text{-}1)^n\cdot3}}$

4. Wow, what a need trick to alternate formulas between even and odd! Props