A sequence is an ordered list of numbers following a specific rule. Each number in a sequence is called a "term." The order in which terms are arranged is crucial, as each term has a specific position, often denoted as an, where n indicates the position in the sequence.
For example:
- 2, 5, 8, 11, 14, . . . [Here, each term is 3 more than the previous term.]
- 3, 6, 12, 24, 48, . . . [Here, each term is 2 times of the preceding term]
- 0, 1, 1, 2, 3, 5, 8, 13, 21, . . . [Here, each term is sum of two preceding terms]
A series is the sum of the terms of a sequence. If we have a sequence a1, a2, a3, . . . the series associated with it is:
S = a1 + a2 + a3 + . . .
There are many sequences in mathematics, but mainly three are asked in school exams, these are arithmetic, geometric, and harmonic:
Arithmetic Sequence
An arithmetic sequence (or arithmetic progression) is a sequence of numbers in which the difference between consecutive terms is constant. This difference is called the common difference (denoted as d).
For example:
- 2, 5, 8, 11, 14, . . . (first term = 2 and common difference = 3)
- 10, 7, 4, 1, −2, . . . (first term = 10 and common difference = -3)
- 1, 2.5, 4, 5.5, 7, . . . (first term = 1 and common difference = 1.5)
The sequence in which each consecutive term has a common difference, and this difference could be positive, negative, and even zero, is known as an arithmetic sequence.
Geometric Sequence
A geometric sequence (or geometric progression) is a sequence of numbers in which the ratio between consecutive terms is constant. This ratio is known as the common ratio (denoted as r).
For example:
- 3, 6, 12, 24, 48, . . . (first term = 3 and common ratio = 2)
- 1, 3, 9, 27, 81, . . . (first term = 1 and common ratio = 3)
- 16, 8, 4, 2, 1, . . . (first term = 16 and common ratio = 1/2)
- 5, −10, 20, −40, 80, . . . (first term = 5 and common ratio = -2)
Harmonic Sequence
A harmonic sequence (or harmonic progression) is a sequence of numbers where the reciprocals of the terms form an arithmetic sequence. In other words, if the sequence is a1, a2, a3, . . . , then the sequence of reciprocals 1/a1, 1/a2, 1/a3, . . . is an arithmetic sequence.
For example:
- 1, 1/2, 1/3, 1/4, 1/5, . . . (as 1, 2, 3, 4, 5, . . . is arithmetic sequence)
- 3, 3/2, 1, 3/4, 3/5, . . . (1/3, 2/3, 3/3, 4/3, 5/3, . . . is arithmetic sequence)
➣ Note: Besides these, another commonly known sequence is the Fibonacci Sequence.
For arithmetic, geometric, and harmonic sequences, there are various formulas to calculate the nth term or the sum of the sequence. These formulas are:
Type | Formula | Description |
---|
nth term of an Arithmetic Sequence | an = a1 + (n − 1)d | nth term of an arithmetic sequence |
Sum of Arithmetic Series | Sn = 2n(a1 + an) | Sum of the first n terms of an arithmetic series |
nth term of Geometric Sequence | an = a ⋅ rn−1 | nth term of a geometric sequence |
Sum of Geometric Series (Finite) | Sn = a(1 − rn)/(1 − r) | Sum of the first n terms of a geometric series |
Sum of Geometric Series (Infinite) | S∞ = a/(1 − r) (For r < 1} | The sum of the infinite geometric series where r < 1. |
Harmonic Series | Hn = ∑nk=1 (1/k) | Sum of the first n terms of the harmonic series |
Sequences vs Series
Sequence and series are often used interchangeably by many, but there is a very clear difference between them. These differences are listed in the following table:
Aspect | Sequence | Series |
---|
Definition | An ordered list of numbers, following a specific rule or pattern. | The sum of the terms of a sequence. |
Notation | Typically denoted as an or {an}. | Typically denoted as Sn or ∑an. |
Example | 1, 2, 3, 4, 5, . . . (Arithmetic sequence) | 1 + 2 + 3 + 4 + 5 + . . . (Sum of the sequence) |
Main Focus | Focuses on the terms themselves. | Focuses on the sum of the terms. |
Representation | Written as a list or a formula for the nth term. | Written using summation notation (∑). |
Use Cases | Used to define patterns or behaviors in data sets. | Used to calculate totals, averages, or in calculus for convergence. |
Convergence | Not applicable; it is a list of values. | Can converge to a limit (infinite series) or diverge. |
➣ Read in detail - [ Sequence vs Series ]
Convergence and Divergence of Series
Given a sequence {an}, the series is written as:
\sum_{n=1}^{\infty} a_n = a_1 + a_2 + a_3 + \dots
- A series \sum_{n=1}^{\infty} a_n converges if the sequence of partial sums SN = a1 + a2 + ⋯ + aN approaches a finite limit as N → ∞:
\lim_{N \to \infty} S_N = S
Where S is a finite number. In this case, the series is said to have the sum S.
- A series \sum_{n=1}^{\infty} a_n diverges if the sequence of partial sums SN does not approach a finite limit as N→∞. In other words, if SN either grows without bound or oscillates as N → ∞, the series diverges.
Read More about Convergence Tests.
Special Series
Some special series are:
- Arithmetic-Geometric Series (AGS) is a special type of series that combines both arithmetic and geometric sequences. It can be expressed in the form:
S = a + (a + d)x + (a + 2d)x2 + (a + 3d)x3 + . . .
- Binomial Series is an infinite series that provides a way to expand expressions of the form (a + b)n, where n is any real number (not just a positive integer). The series is derived from the Binomial Theorem, which states that:
(a + b)^n = \sum_{k=0}^{\infty} \binom{n}{k} a^{n-k} b^k
- Taylor Series of a function f(x) about a point a is given by the formula:
f(x) = f(a) + f'(a)(x - a) + \frac{f''(a)}{2!}(x - a)^2 + \frac{f'''(a)}{3!}(x - a)^3 + \ldots
This can be expressed in summation notation as:
f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x - a)^n
- Maclaurin Series is a special case of the Taylor Series, where the expansion is around the point a = 0:
f(x) = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 + \ldots
In summation form, it is:
f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!}x^n
Read More,
Solved Examples on Sequence and Series
Question 1: Find the 10th term of the sequence: 4, 8, 12, 16, 20, ...
Solution:
Use the formula for the nth term of an arithmetic sequence: an = a1 + (n − 1) ⋅ d
For n = 10
a10 = 4 + (10 − 1) ⋅ 4 = 4 + 36 = 40
Answer: The 10th term is 40.
Question 2. Find the sum of the first 6 terms of the sequence: 2, 6, 18, 54, 162, …
Solution:
Use the sum formula for the first n terms of a geometric series:
S_n = a \cdot \frac{1 - r^n}{1 - r}
For n = 6:
S_6 = 2 \cdot \dfrac{1 - 3^6}{1 - 3} = 2 \cdot \dfrac{1 - 729}{-2} = 2 \cdot \dfrac{-728}{-2}
Answer: The sum of the first 6 terms is 728.
Question 3. If the sequence is 1, 12, 13, … find the sum of the first 5 terms of the harmonic series.
Solution:
The harmonic sequence is \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5}
S_5 = 1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} = 2.2833
Answer: The sum of the first 5 terms is approximately 2.2833.
Question 4. Calculate the sum of the first 15 terms of the sequence: −5, −2, 1, 4, 7, …
Solution:
Use the sum formula for an arithmetic series:
S_n = \frac{n}{2} \cdot (2a_1 +(n-1) d)
For the first 15 terms:
Now, calculate the sum:
- S15 = 15/2⋅(2⋅( −5) + (15 − 1)⋅3)
- S15 = 15/2 ⋅ ( -10 + 42)
- S15 = 15/2 ⋅ (32)
- S15 = 15 ⋅ 16 = 240
Answer: The sum of the first 15 terms is 240.
Question 5. Find the sum of the infinite geometric series: \frac{5}{3} + \frac{5}{9} + \dots
Solution:
Use the sum formula for an infinite geometric series (when ∣r∣<1): S_{\infty} = \frac{a}{1 - r}
where:
- a1 is the first term,
- r is the common ratio
The first term of the series is 5/3, and the common ratio is 1/3
Apply the formula for the infinite series:
The series converges if the absolute value of the common ratio ∣r∣<1|, which is true here because ∣r∣=1/3.
Now, applying the formula:
S_\infty = \dfrac{\frac{5}{3}}{1 - \dfrac{1}{3}} = \dfrac{\frac{5}{3}}{\dfrac{2}{3}} = \dfrac{5}{3} \times \dfrac{3}{2} = \dfrac{5}{2}
Answer: The sum of the infinite series is 2.5
Question 6. The nth term of a sequence is given by the formula: an = a1 + (n − 1) d, If the first term a1 = 10 and the common difference d = −2, what is the 8th term of the sequence?
Solution:
Use the formula for the nth term of an arithmetic sequence:
an = a1 + (n − 1) ⋅ d
For n = 8:
a8 = 10 + (8 − 1)⋅(−2)
a8 = 10 + 7⋅(−2)
a8 = 10 − 14
= −4
Answer: The 8th term is -4.
Practice Questions on Sequence and Series
- Find the 12th term of the sequence: 5, 10, 15, 20, 25, ...
- Find the sum of the first 8 terms of the sequence: 3, 9, 27, 81, 243, ...
- If the sequence is 2, 6, 10, …, find the sum of the first 10 terms.
- Calculate the sum of the first 20 terms of the sequence: 7, 11, 15, 19, 23, ...
- Find the sum of the infinite geometric series: 1/4 + 1/16 + …
- The nth term of a sequence is given by the formula: an = a1 + (n − 1)⋅d, If the first term a1 = 3 and the common difference d = 5, what is the 15th term of the sequence?
Similar Reads
Basics & Prerequisites
Data Structures
Array Data StructureIn this article, we introduce array, implementation in different popular languages, its basic operations and commonly seen problems / interview questions. An array stores items (in case of C/C++ and Java Primitive Arrays) or their references (in case of Python, JS, Java Non-Primitive) at contiguous
3 min read
String in Data StructureA string is a sequence of characters. The following facts make string an interesting data structure.Small set of elements. Unlike normal array, strings typically have smaller set of items. For example, lowercase English alphabet has only 26 characters. ASCII has only 256 characters.Strings are immut
2 min read
Hashing in Data StructureHashing is a technique used in data structures that efficiently stores and retrieves data in a way that allows for quick access. Hashing involves mapping data to a specific index in a hash table (an array of items) using a hash function. It enables fast retrieval of information based on its key. The
2 min read
Linked List Data StructureA linked list is a fundamental data structure in computer science. It mainly allows efficient insertion and deletion operations compared to arrays. Like arrays, it is also used to implement other data structures like stack, queue and deque. Hereâs the comparison of Linked List vs Arrays Linked List:
2 min read
Stack Data StructureA Stack is a linear data structure that follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out). LIFO implies that the element that is inserted last, comes out first and FILO implies that the element that is inserted first
2 min read
Queue Data StructureA Queue Data Structure is a fundamental concept in computer science used for storing and managing data in a specific order. It follows the principle of "First in, First out" (FIFO), where the first element added to the queue is the first one to be removed. It is used as a buffer in computer systems
2 min read
Tree Data StructureTree Data Structure is a non-linear data structure in which a collection of elements known as nodes are connected to each other via edges such that there exists exactly one path between any two nodes. Types of TreeBinary Tree : Every node has at most two childrenTernary Tree : Every node has at most
4 min read
Graph Data StructureGraph Data Structure is a collection of nodes connected by edges. It's used to represent relationships between different entities. If you are looking for topic-wise list of problems on different topics like DFS, BFS, Topological Sort, Shortest Path, etc., please refer to Graph Algorithms. Basics of
3 min read
Trie Data StructureThe Trie data structure is a tree-like structure used for storing a dynamic set of strings. It allows for efficient retrieval and storage of keys, making it highly effective in handling large datasets. Trie supports operations such as insertion, search, deletion of keys, and prefix searches. In this
15+ min read
Algorithms
Searching AlgorithmsSearching algorithms are essential tools in computer science used to locate specific items within a collection of data. In this tutorial, we are mainly going to focus upon searching in an array. When we search an item in an array, there are two most common algorithms used based on the type of input
2 min read
Sorting AlgorithmsA Sorting Algorithm is used to rearrange a given array or list of elements in an order. For example, a given array [10, 20, 5, 2] becomes [2, 5, 10, 20] after sorting in increasing order and becomes [20, 10, 5, 2] after sorting in decreasing order. There exist different sorting algorithms for differ
3 min read
Introduction to RecursionThe process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called a recursive function. A recursive algorithm takes one step toward solution and then recursively call itself to further move. The algorithm stops once we reach the solution
14 min read
Greedy AlgorithmsGreedy algorithms are a class of algorithms that make locally optimal choices at each step with the hope of finding a global optimum solution. At every step of the algorithm, we make a choice that looks the best at the moment. To make the choice, we sometimes sort the array so that we can always get
3 min read
Graph AlgorithmsGraph is a non-linear data structure like tree data structure. The limitation of tree is, it can only represent hierarchical data. For situations where nodes or vertices are randomly connected with each other other, we use Graph. Example situations where we use graph data structure are, a social net
3 min read
Dynamic Programming or DPDynamic Programming is an algorithmic technique with the following properties.It is mainly an optimization over plain recursion. Wherever we see a recursive solution that has repeated calls for the same inputs, we can optimize it using Dynamic Programming. The idea is to simply store the results of
3 min read
Bitwise AlgorithmsBitwise algorithms in Data Structures and Algorithms (DSA) involve manipulating individual bits of binary representations of numbers to perform operations efficiently. These algorithms utilize bitwise operators like AND, OR, XOR, NOT, Left Shift, and Right Shift.BasicsIntroduction to Bitwise Algorit
4 min read
Advanced
Segment TreeSegment Tree is a data structure that allows efficient querying and updating of intervals or segments of an array. It is particularly useful for problems involving range queries, such as finding the sum, minimum, maximum, or any other operation over a specific range of elements in an array. The tree
3 min read
Pattern SearchingPattern searching algorithms are essential tools in computer science and data processing. These algorithms are designed to efficiently find a particular pattern within a larger set of data. Patten SearchingImportant Pattern Searching Algorithms:Naive String Matching : A Simple Algorithm that works i
2 min read
GeometryGeometry is a branch of mathematics that studies the properties, measurements, and relationships of points, lines, angles, surfaces, and solids. From basic lines and angles to complex structures, it helps us understand the world around us.Geometry for Students and BeginnersThis section covers key br
2 min read
Interview Preparation
Practice Problem