This famous arithmetic sequence (progression) problem was supposedly solved by the mathematician Gauss in his childhood. In essence, one solution involves starting at the center of the 100 numbers and adding the two terms (e.g., 50 + 51), and then spreading out in both directions. The learner soon realizes that each pair is equal to 101 and that there are 50 pairs. In general, forms like this one are challenging to discover. An infinite arithmetic progression grows without bounds. A finite arithmetic progression can sometimes be represented by an alternate form that simplifies the calculation. For example, the Gauss approach could be written as:

(number of pairs)(sum of each pair)=n2(n+1)(number\ of\ pairs)\cdot(sum\ of\ each\ pair) = \frac{n}{2}(n +1)

The algebraic portion after the “=” sign is called a “closed-form.” The discovery of closed forms is nontrivial and outside our scope in this lesson.

Simply put, the sum of the first one hundred values looks like this:


We can always sum an arithmetic sequence using the summation notation and working through the arithmetic.





What is the sum of the seven values?

Assign your answer to checkpoint_1 in the code editor.


What is the partial sum of this arithmetic sequence?


Assign your answer to checkpoint_2 in the code editor.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?