Chemical Forums

Specialty Chemistry Forums => Other Sciences Question Forum => Topic started by: Corribus on November 01, 2018, 02:06:48 PM

Title: Math help
Post by: Corribus on November 01, 2018, 02:06:48 PM
Can anyone figure out a simple expression for the following series of terms (n starting at 0 or 1)? I would like to express as a summation of terms.

x, 2-x, 2+x, 4-x, 4+x, 6-x, 6+x, .

? I can't think of one. Obviously I could break it into two summations but that becomes cumbersome.

Cyberbeer to whoever comes up with something. :)
Title: Re: Math help
Post by: Corribus on November 01, 2018, 05:14:21 PM
I get to buy myself a beer. I had to use a few trigonometric functions. My expression is pretty ugly and could probably be simplified but I'm too tired.
Title: Re: Math help
Post by: Enthalpy on November 05, 2018, 08:22:14 AM
Would this fit your needs?
n+0.5+(-1)n(x-0.5)
starts giving x for n=0.

(-1)n could be cos(n×π) if any better.