2544.11 – Function as Average


Let xk=(1)kx_k = (-1)^k for any positive integer kk. Let f(n)=(x1+x2+...+xn)nf(n) = \dfrac{(x_1 + x_2 + ... + x_n)}{n}, where nn is a positive integer.

Give the range of this function.

  1. 00

  2. 1n\dfrac{1}{n} (where nn is any positive integer)

  3. 00 and 1n\dfrac{-1}{n} (where nn is any odd positive integer)

  4. 00 and 1n\dfrac{1}{n} (where nn is any positive integer)

  5. 11 and 1n\dfrac{1}{n} (where nn is any odd positive integer).


Solution

Let's compute:

xk=(1)kx1=1x2=1x3=1x4=1.\begin{aligned}x_k &= (-1)^k \\x_1 &= -1 \\x_2 &= 1 \\x_3 &= -1 \\x_4 &= 1.\end{aligned}

So, xn=1x_n = -1 if nn is odd and xn=1x_n = 1 if nn is even. Thus x1+x2+...+xn=0x_1 + x_2 + ... + x_n = 0 if nn is even, 1-1 if nn is odd.

So,

f(1)=11=1f(2)=01=0f(3)=13f(4)=04=0f(5)=15\begin{aligned}f(1) &= \dfrac{-1}{1}= -1 \\[0.5em]f(2) &= \dfrac{0}{1}= 0 \\[0.5em]f(3) &= \dfrac{-1}{3} \\[0.5em]f(4) &= \dfrac{0}{4}= 0 \\[0.5em]f(5) &= \dfrac{-1}{5}\end{aligned}

The answer is (c).