Lecture 22-23
Sequences
Chapter #2
Topic 2.4
Lecture Outline
– Arithmetic Sequence and Geometric
Sequence
– Determine a sequence formula
– Summation
– Evaluate a summation
– Shifting the index of summation
– Double Summation
06/13/2025 CSC102 - Discrete Structures 2
Sequences
–A sequence is a discrete structure used to represent an
ordered list of elements.
EXAMPLES:
1. 1, 2, 3, 4, 5, …
2. 4, 8, 12, 16, 20,…
3. 2, 4, 8, 16, 32, …
4. 1, 1/2, 1/3, 1/4, 1/5, …
5. 1, 4, 9, 16, 25, …
6. 1, -1, 1, -1, 1, -1, …
Sequences
• A sequence is a function from a subset of the
set integers Z (usually the set {0,1,2,…} or the
set {1,2,3,…}) to a set S.
• The notation denotes the image of the
integer .
• : a term of the sequence
Z S
• {} : entire sequence
– Same notation as sets! n an
Sequences
• Consider the sequence {an}, where an = 1/n.
– The list of the terms of this sequence beginning with
a1:
a1, a2, a3, a4, …
{1, 1/2, 1/3, 1/4 , … }
• Consider the sequence {an}, where an = 3n.
– The list of the terms of this sequence beginning with
a1:
{3, 6, 9, 12 , …}
Geometric Sequence/Progression
A geometric progression is a sequence of the form
Where the initial term a and the common ratio r are real
numbers.
• Every term (after the first) is obtained from the preceding
term by multiplying it with a constant number.
• Common ratio: The constant number, being the ratio of any
two consecutive terms is called the common ratio denoted
by “r”.
EXAMPLE:
1, 2, 4, 8, 16, … (common ratio = 2)
3, - 3/2, 3/4, - 3/8, … (common ratio = - 1/2)
0.1, 0.01, 0.001, 0.0001, … (common ratio = 0.1 = 1/10)
General Term of Geometric Progression
• Let a be the first term and r be the common ratio
of a geometric sequence. Then the sequence is
• If , for , represents the terms of the sequence
then
first term
second term
third term
By symmetry
nth term for all integers .
Examples-Geometric Progression
• Is {} geometric progression?
2,10,50,250,…
Yes, a=2 and r=5
• Is {} geometric progression?
6,2,2/3,2/9,…
Yes, a=6 and r=1/3
Examples-Geometric Progression
• Find the 8th term of the following geometric
sequence
Here a = first term = 4
r = common ratio = 12/4 = 3
n = term number = 8
a8 = value of 8th term = ?
Since an = a r n-1; n 1
a8 = (4)(3)8-1
= 4 (2187)
= 8748
Arithmetic Sequence/Progression
An arithmetic progression is a sequence of the form
Where the initial term a and the common difference d are
real numbers.
• Every term (after the first )is obtained from the preceding term by
adding a constant number is
• The difference of any two consecutive terms is called the common
difference “d”.
EXAMPLES:
5, 9, 13, 17, … (common difference = 4)
0, -5, -10, -15, … (common difference = -5)
x + a, x + 3a, x + 5a, … (common difference = 2a)
General Term of Arithmetic Progression
• Let a be the first term and d be the common
difference of an arithmetic sequence. Then the
sequence is
• If , for , represents the terms of the sequence
then
first term
second term
third term
By symmetry
nth termfor all integers
11
Arithmetic Progression (Example)
• Is Arithmetic progression?
-1,3,7,11,…
Yes, a = -1 and d = 4
• Is Arithmetic progression?
7,4,1,-2,…
Yes, a=7 and d=-3
Arithmetic Progression (Example)
• Find the 20th term of the arithmetic sequence
SOLUTION:
Here a = first term = 3
d = common difference = 9 - 3 = 6
n = term number = 20
a20 = value of 20th term = ?
Since an = a + (n - 1) d; n 1
a20 = 3 + (20 - 1) 6
= 3 + 114
= 117
Arithmetic Progression (Example)
• Which term of the arithmetic sequence
SOLUTION:
Here a = first term = 4
d = common difference = 1 - 4 = -3
an = value of nth term = - 77
n = term number = ?
Since
an = a + (n - 1) d n 1
- 77 = 4 + (n - 1) (-3)
- 77 - 4 = (n - 1) (-3)
OR
81
n 1
OR 3
27 = n – 1
n = 28
Hence –77 is the 28th term of the given sequence.
Useful Sequences
Determining the Sequence Formula
• Given values in a sequence, how do you
determine the formula?
• Steps to consider:
– Is it an arithmetic progression (each term a constant
amount from the last)?
– Is it a geometric progression (each term a factor of the
previous term)?
– Does the sequence repeat itself (or cycle among the terms)?
– Does the sequence combine previous terms (in a certain
way)?
– Are there runs of the same value? (same value occur many
times in a row)
16
Sequences (Example)
• Find a formula for the following sequence.
Solution:
The sequence alternates 1’s and 0’s, increasing the number of
1’s and 0’s each time.
• Find formula for the following sequence.
Solution:
It is a geometric progression. a=1 and r=-1
Sequences (Example)
• Find formula for the following sequence.
Solution:
It is a arithmetic progression.
a=1 and d=2
Sequences (Example)
• How can you produce the terms of the
following sequence?
A rule for generating this sequence is that integer n appears
exactly n times.
2, 3, 3, 5, 5, 5, 7, 7, 7, 7, 11, 11, 11,
11, 11, …
Sequence in which the n th prime number is listed n times
Sequences (Example)
• How can you produce the terms of the
following sequence?
Sequences (Example)
• How can you produce the terms of the
following sequence?
Solution:
• The formula for expressing arithmetic
𝑎𝑛=𝑎1+(𝑛−1)⋅𝑑
sequences in their explicit form is:
𝑎𝑛=5+(𝑛−1)⋅6= 6n-1
The explicit form of this arithmetic sequence is:
A rule for generating this sequence is
Sequences (Example)
• Find a formula for the following sequence.
Solution:
Each term is less than the previous term.
Sequences (Example)
• Find a formula for the following sequence?
Solution:
Each term is twice the cube of .
Sequences (Example)
• Find formula for the following sequence.
Solution:
Compare it to .
Summations/Series
Summations
• The sum of the terms from the sequence {} is:
• where donates summation and j is the index of
summation.
• m is lower limit and n is upper limit.
Summations
The symbol “S” takes a sequence of numbers
and turns it into a sum.
Symbolically:
n
a
i 0
i a0 a1 a2 ... an
This is read as “the sum from i =0 to i =n of ai”
• Note how “S” converts commas into plus signs.
• One can also take sums over a set of numbers:
x
xS
2
Summations/Series
• A summation:
is like a for loop:
int sum = 0;
for ( int j = m; j <= n; j++ )
sum += a(j);
Summations (Example)
Express the sum of the first 100 terms of the
sequence {1/n} for n=1,2,3,… .
Solution:
Summations on Sets (Example)
Summations (Example)
What is the value of ?
Solution:
More Summations (Example)
•
More Summations (Example)
Evaluate
Solution:
Properties of Summations
Example
n n
3 (2k 3) (4 5k )
k 1 k 1
n n
3 (2k 3) (4 5k )
k 1 k 1
n
[3(2k 3) (4 5k )]
k 1
n n n
( k 5) k 5
k 1 k 1 k 1
n
k 5n
k 1
Shifting the Index of Summation
• Shifting the index of summation is often done
when two sums need to be added but their
indices of summation do not match.
• Make the appropriate changes in the
corresponding sum and index.
Example:
shift the index of summation from 0 to 4 rather
than from 1 to 5. to do this,
Shifting the Index of Summation
Example:
shift the index of summation from 0 to 4 rather than from 1 to 5.
Solution:
Here j starts with 1 and we want to start with 0. So
assume k=j-1 so, j= k + 1
It is easily checked that both sums are
1 + 4 + 9 + 16 + 25 = 55.
Double Summations
• Like a nested for loop
Is equivalent to:
int sum = 0;
for ( int i = 1; i <= 4; i++ )
for ( int j = 1; j <= 3; j+
+ )
sum += i*j;
Double Summations
• Solution:
Example
.
Some Useful Summations
Example
Find
Example
Find .
Find .
Exercise Questions
Chapter # 2
Topic # 2.4
Questions 1, 2,3, 4, 25, 26, 29, 30,31, 32, 33, 34,
39, 40,41,42