![]() |
VOOZH | about |
A sequence of numbers is called a Geometric progression if the ratio of any two consecutive terms is always the same.
In simple terms, A geometric series is a list of numbers where each number, or term, is found by multiplying the previous term by a common ratio r. The general form of Geometric Progression is:
Where,
a = First term
r = common ratio
arn-1 = nth term
Example:
The sequence 2, 4, 8, 16 is a GP because ratio of any two consecutive terms in the series (common difference) is same (4 / 2 = 8 / 4 = 16 / 8 = 2).
In finite geometric progression contains a finite number of terms. The last term is always defined in this type of progression.
Example:
The sequence 1/2,1/4,1/8,1/16,...,1/32768 is a finite geometric series where the first term is 1/2 and the last term is 1/32768.
Infinite geometric progression contains an infinite number of terms. The last term is not defined in this type of progression.
Sequence 3, 9, 27, 81, ... is an infinite series where the first term is 3 but the last term is not defined.
If ‘a1' is the first term and ‘r’ is the common ratio. Thus, the explicit formula for nthterm of finite GP series:
The formula for the sum of the nth term of Geometric Progression:
How do we check whether a series is a Geometric progression or not?
The property of the GP series is that the ratio of the consecutive terms is same.
Approach:
Below is the implementation of the above approach:
True
Time Complexity: O(n), Where n is the length of the given array.
Auxiliary Space: O(1)
Basic Program related to Geometric Progression
More problems related to Geometric Progression