# How can I find the general formula for the following real sequence

How can I find the general formula for the following real sequence $$(x_n)_{n \ge0}=(1,0,-1,0,\frac{1}{2},0,\frac{-1}{6},0,\frac{1}{24},0,\frac{-1}{120},\ldots)$$ I just know $x_0$ to $x_{10}$ so how can I find the general formula for this real sequence?

• Hint: Think about the factorial. – Michael Burr Apr 29 '15 at 19:35

## 5 Answers

To get it into one equation, you can use that $$\cos{\tfrac{1}{2}n\pi} = \begin{cases} 1 & n = 4k \\ 0 & n= 4k \pm 1 \\ -1 & n=4k+2 \end{cases},$$ where $k \in \mathbb{Z}$. This then gives the squence as $$x_n = \frac{\cos{\frac{1}{2}n\pi}}{(n/2)!}$$ (What is $(n/2)!$ when $n$ is odd? You don't need to know for this, but you can get it from $(-1/2)!=\sqrt{\pi}$, which you'll learn about later on. Point is, it's not zero, so the odd terms are still zero.

• Nice. Very clever use of $\cos$. – hypergeometric Apr 30 '15 at 17:57

It appears that you have $$x_n=\begin{cases} 0 & n\text{ odd}\\ (-1)^{n/2}\frac{1}{(n/2)!} & n\text{ even}\end{cases}$$

HINT: You will need to split the formula into two parts, one for odd subscripts and one for even subscripts. The one for odd subscripts should be pretty obvious. For the even subscripts, note that $x_{2n}$ is negative when $n$ is odd and positive when $n$ is even; you should know a simple function of $n$ that is $-1$ when $n$ is odd and $1$ when $n$ is even, and you can make this function a factor in your formula. Finally, you should recognize the denominators $1,1,2,6,24,120,\ldots$ as a familiar sequence; to give you a little more help, the next two terms are $720$ and $5040$.

x(n)=((-1)^(n/2))*(1/((n/2)!)) , if n=even x(n)=0 , if n=odd

• For some basic information about writing math at this site see e.g. here, here, here and here. Also note that @vadim123 gave the same answer 4 minutes ago, so you might consider deleting this altogether, since it doesn't add anything new. – AlexR Apr 29 '15 at 19:40
• @AlexR sorry I didn't see that, actually I was typing at that time. My typing is a bit slow. And thanks a lot for that information. – dknight Apr 29 '15 at 19:55

Inspired by the solution by Chappers above, here's my contribution:

$$\large x_n=\frac{\Re (i^n)}{\big(\frac n2\big)!}$$