1. Arithmetic Series#
1.1. Derivation#
Let us start by adding the integers from 1 to 5. The total is,
Rewrite the sum as,
Notice that, \(5 - 1\) is cancelled out by the \(-4\) in \((5 - 4)\). \((5 - 2)\) is cancelled out by \(-3\) in \((5 - 3)\). Therefore, the equation above can be simplified to,
Now let us do the sum from 1 to 6.
This reduces down to,
The situation looks slightly different when the maximum number is even. Let us come up with a general rule for the sum when \(n\) is odd. Consider the follow sum,
Since \(n\) is odd, not including \((n - 0)\), there are an even number of remaining terms since \(n - 1\) must be even.
Notice that \((n - 1)\) is cancelled out by \(- (n - 1)\) from \((n - (n - 1))\). In fact all terms \(n - i\) where \(i \leq (n - 1) / 2\) will be cancelled out by its corresponding term in \(n - (n - i)\) for \(i \gt (n - 1) / 2\). Let us prove this for the case where \(i = (n - 1) / 2\), which is the midpoint. In this case on the left side, we have,
Its corresponding term on the right will be \(i = (n - 1) / 2 + 1\). Resulting in,
The terms therefore cancel. Cancelling out all these terms leaves us with,
Now let us consider the cases were \(n\) is even. Again we have the same sum,
But if we ignore the first term there are an odd number of remaining terms meaning there will be one term left when we cancel everything out. The term that is left over will be,
The fraction here is floored midpoint. Cancelling everything out again means that in the end we have,
So, it does not matter \(n\) is even or odd, we still get the same result.
In summary, the formula is,
1.2. Simpler Proof#
The proof above is more complicated than it needs to be and in fact there is a much simpler proof. Consider the following sum.
Consider the same sum in reverse order.
Add the two together.
Therefore,
And finally,