Sum of Arithmetic Series | Free Discrete Mathematics Lesson (4 College Credits) | UPI Study

UPI Study › Courses › Discrete Mathematics › Free lessons › Lesson 3.6 Free with a free account

Sum of Arithmetic Series

Discrete Mathematics · Chapter 3: Sequences and SeriesSection 3.6 · lesson 22 of 879 min · free with a free account

← Sigma Notation and SeriesNext lesson: Sum of Geometric Series →

Earn 4 college credits for Discrete MathematicsRecommended for credit by NCCRS · Math 230 · self-paced · one payment, lifetime access

In this lesson

A whole sum collapsed into one closed-form expression.

  • Define an arithmetic series
  • Derive its sum by writing it forwards and backwards
  • Apply both forms of the sum formula
  • Compare the closed form with repeated addition

Transcript

Everything said in the video, section by section (1,315 words). Read along, or search it.

Sequences and Series

Sum of Arithmetic Series

Section three point five introduced sigma notation as a compact name for a sum. This section goes one step further, for an especially common kind of sum. When the terms form an arithmetic sequence, the whole sum collapses into a single closed-form expression. No loop, and no term-by-term addition. We'll derive it by writing the sum forwards and backwards, apply both forms of the formula, and compare it with repeated addition.

The Opening Problem

A Fiber Rollout's Grand Total

A regional internet provider is planning a multi-year fiber rollout. Crews activate more new connections each month than the month before, as trained crews are added and earlier street work matures. It's a steady, fixed increase, month over month. Sales forecasting doesn't want the month-by-month figures. It wants the grand total across the whole rollout, recomputed instantly every time a planning assumption changes. Re-adding dozens of numbers by hand, every time an assumption shifts, is exactly the kind of repeated, mechanical work discrete mathematics is good at eliminating.

Definition 3.6.1

Arithmetic Series

Recall that an arithmetic sequence has a fixed common difference d between consecutive terms. The i-th term is a one plus i minus one times d. Adding the terms of a finite arithmetic sequence produces its arithmetic series. S sub n is the sum of its n terms, a one through a n. In the notation of the previous section, it's the n-th, and final, partial sum. Adding the terms one at a time always works. But it costs n minus one additions, however the terms are structured. Because each term is just a one plus a fixed multiple of d, that structure makes a dramatic shortcut possible.

A Well-Known Story

1 + 2 + ... + 100

A well-known story in mathematical folklore, whose accuracy is disputed, holds that a young Carl Friedrich Gauss, was asked to add the whole numbers from one to one hundred. He produced the answer almost immediately. Instead of adding in order, he paired the first number with the last, the second with the second-to-last, and so on. One plus one hundred, two plus ninety-nine, three plus ninety-eight. Every one of the fifty pairs sums to one hundred one. Fifty pairs of one hundred one is five thousand fifty, with no adding in sequence.

Step 1

Write the Sum Forwards and Backwards

Here's the general argument, for any arithmetic series of n terms. Write the sum forwards, a one plus a two, up to a n. Since order doesn't matter in addition, write the same total backwards, a n plus a n minus one, down to a one. Now add the two expressions term by term. First with first, second with second, and so on. Two S sub n becomes a sum of exactly n bracketed pairs. The k-th pair is a sub k plus a sub n plus one minus k.

Step 2

Every Pair Sums to the Same Value

Now prove that every pair sums to the same value. Using the formula for a term, a sub k is a one plus k minus one times d. And a sub n plus one minus k is a one plus n minus k times d. Add them. Combining like terms, the k and minus k cancel, leaving two a one plus n minus one times d. And that's a one, plus a one plus n minus one times d. Which is a one plus a n. The crucial point is that the index k canceled out entirely. The value a one plus a n doesn't depend on which pair is examined. So every one of the n pairs sums to exactly that.

Theorem 3.6.1

The Sum of an Arithmetic Series

So two S sub n is n pairs, each equal to a one plus a n. Divide both sides by two. The theorem. For an arithmetic series of n terms, S sub n equals n over two, times a one plus a n. Substituting a n equals a one plus n minus one times d gives the equivalent form, n over two, times two a one plus n minus one times d. Both forms compute the sum with a fixed number of operations, however large n is. As a check, Gauss's problem has a one equal to one, a n equal to one hundred, and n equal to one hundred. That gives fifty times one hundred one, which is five thousand fifty.

Figure 3.6.1

Pairing From the Outside In

This figure shows an eight-term arithmetic series, starting at two, with common difference three. The terms are two, five, eight, eleven, fourteen, seventeen, twenty, and twenty-three. Pair them from the outside in. Two with twenty-three, five with twenty, eight with seventeen, eleven with fourteen. Every pair sums to twenty-five, which is the first term plus the last. That's exactly the fact proved algebraically, here for one specific sequence.

Worked Example 3.6.1

The Rollout Total

Back to the fiber rollout. Suppose month one activates sixty connections, and the monthly figure grows by twenty-five each month, for twelve months. First find the last term. a twelve is sixty plus eleven times twenty-five, which is three hundred thirty-five connections in month twelve. Then apply the theorem. S twelve is twelve over two, times sixty plus three hundred thirty-five. That's six times three hundred ninety-five, or two thousand three hundred seventy connections over the year. And when an assumption changes, the total is recomputed in a handful of operations.

Worked Example 3.6.2

Insertion Sort's Worst Case

Here's an example from algorithm analysis. In the worst case, insertion sort compares the i-th element against up to i of the elements already sorted. For an array of seven elements, the six passes compare one, two, three, four, five, and six times. That's an arithmetic series with first term one, difference one, and six terms. So the total is six over two, times one plus six, which is twenty-one comparisons. For an array of any size n, the passes contribute one through n minus one comparisons. By the theorem, that's n minus one, times n, over two. That quadratic expression is exactly why insertion sort's worst-case running time grows like n squared. An arithmetic series sits right inside a running-time analysis.

Table 3.6.1

3 Equivalent Approaches

This table compares three equivalent approaches. When the first and last terms are both known, use n over two times the first term plus the last. It takes a fixed number of operations. When only the first term and the common difference are known, use n over two, times two a one plus n minus one d. It substitutes for the last term directly. And adding term by term takes work that grows with n. It's useful for spot-checking a closed-form result, or when n is small.

Closed Form vs Repeated Addition

From a Loop to 3 Operations

Section three point five computed a running total with an accumulator, one addition per term. That cost grows with n. The theorem replaces the loop with one multiplication, one addition, and one division, however large n is. This code computes the same series both ways. The loop adds each term and steps it forward by d. The formula computes the last term, then applies the theorem. With first term five, difference three, and one thousand terms, the last term is three thousand two. So the sum is five hundred times three thousand seven, which is one million five hundred three thousand five hundred. Three operations, and the same answer the thousand-step loop produces.

Takeaways

Pair, Cancel, Collapse

To summarize. Every finite arithmetic series has a closed-form sum, n over two times the first term plus the last. It follows from writing the series forwards and backwards and adding. Every matched pair equals the same constant, the first term plus the last. The equivalent form, in terms of a one and d, is useful when the last term hasn't been computed yet. The argument works identically for even and odd n. And replacing a loop with the formula, turns work that grows with n into a fixed number of operations. Here's something to think about. Pair a five-term series literally, a one with a five, and a two with a four. What happens to the middle term, a three? Work through that case by hand. And explain why the forwards-plus-backwards version never has to answer that question at all.

About Discrete Mathematics at UPI Study

Discrete Mathematics (Math 230) is a self-paced online course of 87 video lessons in 13 chapters, from logic and proof to counting, probability, graph theory and trees. It carries a NCCRS credit recommendation for 4 semester credits.

Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Why take it here

Why students take Discrete Mathematics with UPI Study

The math behind computer scienceDiscrete Mathematics is the mathematics of computer science: logic, proofs, sets, counting, probability and graphs underpin algorithms, data structures, cryptography and databases. Completing it now lets you qualify for those courses at your university.
Credit at a fraction of the priceThe same 4 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Where the credit goes

Universities that work with NCCRS

Discrete Mathematics carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.

FAQ

Questions students ask us

About Sum of Arithmetic Series

What is an arithmetic series, and how is it different from an arithmetic sequence?
An arithmetic series is the sum of the terms of a finite arithmetic sequence, while the sequence is just the list of terms. If a_i = a_1 + (i-1)d, then S_n = a_1 + a_2 + \cdots + a_n is the series. It is also the n-th partial sum. Adding term by term takes n-1 additions.
How do you derive the sum formula for an arithmetic series by writing it forwards and backwards?
Write S_n forwards, write it again backwards, and add the two copies term by term. This gives 2S_n as n pairs a_k + a_{n+1-k}. Each pair equals 2a_1 + (n-1)d = a_1 + a_n, since k cancels. So 2S_n = n(a_1+a_n), and S_n = \frac{n}{2}(a_1+a_n).
Which form of the arithmetic series formula should I use, and how do I apply it?
Use S_n = \frac{n}{2}(a_1+a_n) when the last term is known. Use S_n = \frac{n}{2}\left(2a_1+(n-1)d\right) when you only have a_1, d, and n. For a_1=60, d=25, n=12, the last term is 60+11\cdot 25=335. Then S_{12}=6\cdot 395=2370. The second form gives the same value.
Why use the closed-form formula instead of just adding the terms one by one?
The formula takes a fixed number of operations no matter how large n is, while repeated addition grows with n. For a_1=5, d=3, and 1000 terms, the last term is 5+999\cdot 3=3002. Then S_{1000}=500\cdot 3007=1{,}503{,}500. A 1000-step loop gives the same answer. Direct addition is still useful for checking a result or when n is small.

About the Discrete Mathematics course

How many college credits is Discrete Mathematics?
Discrete Mathematics (Math 230) carries a NCCRS credit recommendation for 4 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Discrete Mathematics cost and what is included?
$250, paid once, with lifetime access: all 87 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Discrete Mathematics take?
It is self-paced with no deadlines. The 87 lessons total about 13 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

Ready for the full course? Earn 4 credits in Discrete Mathematics.

87 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.

Discrete Mathematics
4 credits · NCCRS
Enroll →