Geometric progression
Given the second and third terms (-2.0 <=g2, g3 <= 2.0) of a GP, find the nth (1 <= n <= 100) term. The output should be a string representing the Inth term, rounded off to 3 decimal places. You are required to fill in a function which takes as input an integer 'n' and sets the output variable to the sum of divisors of 'n'. The output is to be guaranteed to fit in a 32-bit signed integer. Input Specification: input1: Second Term of GP (Double) input2: Third Term of GP (Double) input3: Total number of terms in the series (Int) Output Specification: Return a string representing the nth term, rounded off to 3 decimal places. Example 1: input1: 1 input2: 2 input3: 4 Output: 4.0 Explanation: g2= 1, g3 = 2, n = 4, r = 2, gn = g4 = 4 (r refers to the common ratio between adjacent terms in a geometric progression) Example 2: input1: 1 input2: 2 input3: 5 Output: 8.0 Explanation: g2= 1, g3 = 2, n = 5, r = 2, gng4 = 8 (r refers to the common ratio between adjacent terms in a geometric progression)