# A pattern

#### JDude13

I have a pattern which I am having trouble working out the equation for...
It goes:

$$S=0, x_0=\frac{1}{1}$$

$$S=1, x_0=\frac{0}{2}$$

$$S=2, x_0=\frac{2}{4}$$

$$S=3, x_0=\frac{0}{8}$$

$$S=4, x_0=\frac{6}{16}$$

$$S=5, x_0=\frac{0}{32}$$

$$S=6, x_0=\frac{20}{64}$$
$$\vdots$$

I know it has something to do with
$$\frac{1+cos(\pi S)}{2}$$

I have left the fractions unsimplified to show the relationship with the denominator and S as

$$DENOMINATOR=2^s$$

Last edited by a moderator:

#### Mark44

Mentor
Your formula breaks down at $x_4$ and $x_6$. As your formula stands, $x_S = \frac{1 + \cos(\pi S)}{2^S}$, the numerator will always be 0 or 2.

"A pattern"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving