Given first term (a), common ratio (r) and a integer N of the Geometric Progression series, the task is to find Nth term of the series.
Input : a = 2 r = 2, N = 4 Output : The 4th term of the series is : 16 Input : a = 2 r = 3, N = 5 Output : The 5th term of the series is : 162
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 find the Nth term in the Geometric Progression series we use the simple formula .
TN = a1 * r(N-1)
The 5th term of the series is : 162
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Nth term where K+1th term is product of Kth term with difference of max and min digit of Kth term
- Find the Nth term of the series where each term f[i] = f[i - 1] - f[i - 2]
- Find Nth term of the series where each term differs by 6 and 2 alternately
- Program for N-th term of Arithmetic Progression series
- Ratio of mth and nth term in an Arithmetic Progression (AP)
- Minimize Nth term of an Arithmetic progression (AP)
- Program to print GP (Geometric Progression)
- Removing a number from array to make it Geometric Progression
- Minimum number of operations to convert a given sequence into a Geometric Progression
- Geometric Progression
- Check whether nodes of Binary Tree form Arithmetic, Geometric or Harmonic Progression
- Sum of N-terms of geometric progression for larger values of N | Set 2 (Using recursion)
- Sum of elements of a Geometric Progression (GP) in a given range
- Count subarrays of atleast size 3 forming a Geometric Progression (GP)
- Number of GP (Geometric Progression) subsequences of size 3
- Minimum number of operations to convert a given sequence into a Geometric Progression | Set 2
- Nth term of a sequence formed by sum of current term with product of its largest and smallest digit
- Nth term of given recurrence relation having each term equal to the product of previous K terms
- Program to get the Sum of series: 1 - x^2/2! + x^4/4! -.... upto nth term
- Program to find Nth term in the given Series
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.