Sum of Arithmetic Sequence- Calculation Guide
What Is an Arithmetic Sequence?
An arithmetic sequence is a list of numbers where each term increases or decreases by a fixed amount. That fixed amount is called the common difference.
For example:
- 2, 5, 8, 11, 14 ā common difference is 3
- 100, 90, 80, 70, 60 ā common difference is -10
- 7, 14, 21, 28, 35 ā common difference is 7
The sum of an arithmetic sequence is exactly what it sounds like: adding up all the terms. You can do this manually for short sequences, but once you hit 50 or 100 terms, you'll want the formula.
The Two Formulas You Need
There are two ways to calculate the sum. Both give the same result. Pick whichever feels easier for your situation.
Formula 1: Using First and Last Term
S = n Ć (aā + aā) / 2
Where:
- S = sum of the sequence
- n = number of terms
- aā = first term
- aā = last term
Formula 2: Using First Term and Common Difference
S = n/2 Ć [2aā + (n-1)d]
Where d is the common difference. Use this when you don't have the last term handy.
Quick Comparison
| Formula | Best When | Variables Needed |
|---|---|---|
| S = n(aā + aā)/2 | You know the last term | n, aā, aā |
| S = n/2[2aā + (n-1)d] | You only know the first term and difference | n, aā, d |
How to Calculate ā Step by Step
Example 1: Sum of 1 to 100
You know the classic story: Gauss added 1 through 100 in his head as a kid. Here's how it works with the formula.
Given:
- First term (aā) = 1
- Last term (aā) = 100
- Number of terms (n) = 100
Calculation:
S = 100 Ć (1 + 100) / 2
S = 100 Ć 101 / 2
S = 5050
That's it. The sum of all integers from 1 to 100 is 5,050.
Example 2: Even Numbers from 2 to 50
Given:
- First term = 2
- Last term = 50
- Number of terms = 25 (2, 4, 6... 50)
Calculation:
S = 25 Ć (2 + 50) / 2
S = 25 Ć 52 / 2
S = 650
The sum of even numbers from 2 to 50 is 650.
Example 3: Using the Second Formula
Say you have 15 terms, starting at 3, with a common difference of 4. You don't know the last term.
Given:
- n = 15
- aā = 3
- d = 4
Find the last term first:
aā = aā + (n-1)d = 3 + (14 Ć 4) = 3 + 56 = 59
Now calculate the sum:
S = 15/2 Ć [2(3) + (15-1)(4)]
S = 7.5 Ć [6 + 56]
S = 7.5 Ć 62
S = 465
The sum is 465.
When You Don't Need a Formula
For very short sequences ā say, 3 to 5 terms ā just add them directly. The formula saves time when:
- You have 10+ terms
- The numbers are large
- You're dealing with a sequence defined by a pattern, not a written list
Common Mistakes to Avoid
- Forgetting to divide by 2. The /2 is not optional. Without it, you get exactly double the answer.
- Miscounting the number of terms. If n is wrong, everything else is wrong. Double-check.
- Using the wrong common difference. Make sure it's actually consistent across the whole sequence.
Quick Reference Cheat Sheet
- Sequence: 5, 10, 15, 20, 25 ā n=5, aā=5, d=5
- Sum of 1 to n = n(n+1)/2
- Sum of first n even numbers = n(n+1)
- Sum of first n odd numbers = n²
These shortcuts come up constantly in competitive math and coding interviews. Memorize them.
Why This Matters in Programming
If you're writing code, you don't need to loop through 10,000 numbers to add them. The formula runs in O(1) time.
Python example:
def arithmetic_sum(n, a1, d):
an = a1 + (n - 1) * d
return n * (a1 + an) // 2
print(arithmetic_sum(100, 1, 1)) # Output: 5050
One line. No loops. That's the point of knowing the math.
Bottom Line
The sum of an arithmetic sequence comes down to two things: how many terms and how much they're changing. Once you have those, plug into the formula and solve. The /2 at the end is non-negotiable ā it's what separates the sum from the total of doubling everything.