3. EXAMPLE PROBLEM
Find the sum of all the integers from 1 to 1000.
The sequence of integers starting from 1 to 1000 is given by
1 , 2 , 3 , 4 , ... , 1000
The above sequence has 1000 terms. The first term is 1 and the last term is
1000 and the common difference is equal to 1. We have the formula that
gives the sum of the first n terms of an arithmetic sequence knowing the
first and last term of the sequence and the number of terms (see formula
above).
s1000 = 1000 (1 + 1000) / 2 = 500500
4. TYPE OF SEQUENCE
Sequeance
Special
Arithmetic Geometric
Integers
Sequences Sequences
Sequence
5. WHAT IS ARITHMETIC SEQUENCE
In an Arithmetic Sequence the difference between one term and the next
is a constant.
In other words, you just add the same value each time ... infinitely.
6. In General you could write an arithmetic sequence like this:
{a, a+d, a+2d, a+3d, ... }
where:
a is the first term, and
d is the difference between the terms (called the "common difference")
7. Geometric Sequence
In a Geometric Sequence each term is found by multiplying the previous term
by a constant.
In General you could write a Geometric Sequence like this:
{a, ar, ar2, ar3, ... }
where:
a is the first term, and
r is the factor between the terms (called the
"common ratio")
8. SPECIAL INTEGER SEQUENCE
Triangular • This Triangular Number Sequence is generated from a pattern of dots
which form a triangle.
Numbers
Square • Square numbers, better known as perfect squares, are an integer
which is the product of that integer with itself.
Numbers
Fibonacci • The Fibonacci Sequence is found by adding the two numbers before it
together.
Numbers
• A cube number sequence is a mathematical sequence consisting of a
Cube Numbers sequence in which the next term originates by multiplying the
number 3 times with itself, or in other words, raising it to the power of
three
9. Triangular Numbers
An example of this type of number sequence could be the
following:
1, 3, 6, 10, 15, 21, 28, 36, 45, …
This sequence is generated from a pattern of dots which
form a triangle. By adding another row of dots and
counting all the dots we can find the next number of the
sequence.
11. Square Numbers
1, 4, 9, 16, 25, 36, 49, 64, 81, …
The next number is made by squaring where it is in the pattern.
The second number is 2 squared (22 or 2 2)
The seventh number is 7 squared (7 2 or 7 7) etc
12. Fibonacci Numbers
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …
The Fibonacci Sequence is found by adding the two numbers before it
together.
The 2 is found by adding the two numbers before it (1+1)
The 21 is found by adding the two numbers before it (8+13)
The next number in the sequence above would be 55 (21+34)
13. Cube Numbers
1, 8, 27, 64, 125, 216, 343, 512, 729, …
The next number is made by cubing where it is in the
pattern.
The second number is 2 cubed (23 or 2 2 2)
The seventh number is 7 cubed (7 3 or 7 7 7) etc
14. Give 1 example sequences use in computer programming
Sequence in computer programming is the default control structure, instructions are
executed one after another. They might, for example, carry out a series of arithmetic
operations, assigning results to variables
Example:-
Make a list number of 100 students that attend “seminar keusahawanan”.
Pseudocode
BEGIN
Declare a list as an array with 100 elements
for (int student = 0, student<100; student++){
list[student] = student + 1 (arithmetic operation)
print list[student]
}
END
16. Source Code
public class sequences {
public static void main(String[] args) {
int list [] = new int[100];
for(int student = 0; student<100; student++) {
list[student] = student + 1;
System.out.println(list[student]);
}
}
}
17. PRINCIPLE OF MATHEMATICAL INDUCTION
&
METHOD OF PROOF
PRINCIPLE OF MATHEMATICAL INDUCTION
To prove that P(n) is true for all positive integers n, where P(n)
is a propositional funtion
METHOD OF PROOF
1) BASIS STEP: We verify that P(1) is true.
2) INDUCTIVE STEP: We show that the conditional statement
P(k) → P(k + 1) is true for all positive
integers k.
18. Problem1:
Show that if n is a positive integer, then
1 + 2 + ... + n = n(n + 1)/2.
BASIC STEP: P(1),
1 = 1(1 + 1)/2
1 =1 (RHS=LHS)
INDUCTIVE STEP: we assume that 1 + 2 + ... + k = k(k + 1)/2
it must be shown that P(k + 1) is true,
1 + 2 + ... + k + ( k +1) = (k + 1)[( k+ 1) (k +1) + 1] /2 = (k + 1)(k + 2)/ 2
Add k +1 to both sides of the equation P(k)
1 + 2 + ... + k + (k +1) = k(k +1) /2 + (k +1)
= k(k +1 ) + 2 (k +1 )/2
= (k + 1) (k + 2)/2