Given first term (a), common ratio (r) and a integer n of the Geometric Progression series, the task is to print th n terms of the series.
Input : a = 2 r = 2, n = 4 Output : 2 4 8 16
We know the Geometric Progression series is like = 2, 4, 8, 16, 32 …….
In this series 2 is the stating term of the series .
Common ratio = 4 / 2 = 2 (ratio common in the series).
so we can write the series as :
t1 = a1
t2 = a1 * r(2-1)
t3 = a1 * r(3-1)
t4 = a1 * r(4-1)
tN = a1 * r(n-1)
To print the Geometric Progression series we use the simple formula .
TN = a1 * r(n-1)
2 6 18 54 162
- Program for N-th term of Geometric Progression series
- Geometric Progression
- Number of GP (Geometric Progression) subsequences of size 3
- Removing a number from array to make it Geometric Progression
- Program to print Arithmetic Progression series
- Minimum number of operations to convert a given sequence into a Geometric Progression
- Program for sum of geometric series
- Program for N-th term of Arithmetic Progression series
- Geometric mean (Two Methods)
- Find N Geometric Means between A and B
- Sum of Arithmetic Geometric Sequence
- Find Harmonic mean using Arithmetic mean and Geometric mean
- Program to print Hut
- Number of terms in Geometric Series with given conditions
- Arithmetic Progression
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.