Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Guess the answer ot the sum of the series; 1 - 2^2 + 3^2 - 4^2 + 5^2 - ... based

ID: 3008086 • Letter: G

Question

Guess the answer ot the sum of the series;

1 - 2^2 + 3^2 - 4^2 + 5^2 - ...

based on the sequence of averages of averages of averages of the partial sums of this series. Base your guess on the first 5000 elements of this sequence calculated using Mathematica.

Hint:

It calculates and prints the first 5000 elements of the sequence of averages of the partial sums of the series 11+11+··· . [10 marks]

ClearAll

PartialSum[0] = 0;

For[i = 0, i < 5000, i++, PartialSum[i + 1] = PartialSum[i] + (i + 1)^0 (-1)^i ]

SumOfPartialSum[0] = 0;

For[i = 0, i < 5000, i++,

SumOfPartialSum[i + 1] = SumOfPartialSum[i] + PartialSum[i + 1];

Average[i + 1] = SumOfPartialSum[i + 1]/(i + 1);

Print[N[Average[i + 1]]]]

Explanation / Answer

n may be either even, n=2j, or odd, n=2j-1. For n=2j, the sum will end on the minus sign, i.e.
S(n) = S(2j) = 12 - 22 + 32 - 42 ... + (2j-1)2 - (2j)2
=(1-4*1) + (1-4*2) + ... + (1-4j)
= j - 4 j (j+1) / 2
= j - 2 j (j+1) = j (1-2j-2) = -j (2j+1) = -2j (2j+1)/2
= -n (n+1)/2
So it looks like you are correct for n even. However, for n odd ...