sum of 4 terms of g p is 30 & sum of first and last term is 18 . Find gp

a(r^4-1)/(r-1) = 30

a + ar^3 = 18

a(1+r^3) = 18
it's easy to see that if a=2, r=2
Does that work on S4?
2*15/1 = 30. Yes

So, the GP is

2,4,8,16,...

Please give the answer in lengthy way and full maths but sir you solved this logic

To find the geometric progression (GP), we need to use the given information.

Let's consider the terms of the GP as a, ar, ar^2, and ar^3, where a is the first term and r is the common ratio.

Given:
The sum of 4 terms of the GP is 30:
a + ar + ar^2 + ar^3 = 30 ----(1)

The sum of the first and last term is 18:
a + ar^3 = 18 ----(2)

Now, we have a system of equations with two variables (a and r). To solve the system, we can use substitution or elimination method.

Let's solve the system using the substitution method:

From equation (2), we can express a in terms of r:
a = 18 - ar^3 ----(3)

Now, substitute this expression for a in equation (1):
(18 - ar^3) + ar + ar^2 + ar^3 = 30

Rearranging and simplifying the equation:
18 + ar + ar^2 = 30

Subtracting 18 from both sides:
ar + ar^2 = 12

Factoring out r:
ar(1 + r) = 12

Now, we have two equations:
1) ar + ar^2 = 12
2) ar(1 + r) = 12

Divide equation (2) by equation (1) to eliminate ar:
(ar(1 + r))/(ar) = 12/12

Simplifying:
1 + r = 1

Since we obtained 1 = 1, this means the value of r can be any real number.

Now, substitute the value of r in equation (3) to find the value of a:
a = 18 - ar^3

Since we have chosen a value of r in the previous step, we can substitute that value into the equation to find the corresponding value of a.

Hence, to find the geometric progression (GP) that satisfies the given conditions, you need to substitute the value of r (which can be any real number) into the equation a = 18 - ar^3.