The 2nd term in Geometric sequence is -4 and the 5th is 32 ,find the general formula \term and the first 3 terms ,find the 18th term

a r^0 + a r^1 + a r^2 +.... ar^(n-1)

the 18th term is ar^17
if a = 2 and r = -2
then a r^17 = 2 (-2)^17
= - 2^17 = -131072

To find the general formula for a geometric sequence, we need two pieces of information: the first term (a₁) and the common ratio (r).

Given that the 2nd term is -4, we can write the equation for the 2nd term of a geometric sequence as:

a₂ = a₁ * r^(2-1)

Substituting -4 for a₂, we have:

-4 = a₁ * r

Similarly, for the 5th term:

a₅ = a₁ * r^(5-1)
32 = a₁ * r^4

Now, we have two equations that can be solved simultaneously to find the values of a₁ and r.

Equation 1: -4 = a₁ * r
Equation 2: 32 = a₁ * r^4

Dividing the two equations, we get:

32 / -4 = (a₁ * r^4) / (a₁ * r)
-8 = r^3

Taking the cube root of both sides, we have:

r = -2

Substituting the value of r into Equation 1, we can solve for a₁:

-4 = a₁ * (-2)
a₁ = 2

Now that we have found the first term (a₁ = 2) and the common ratio (r = -2), we can find the general formula for the sequence:

aₙ = a₁ * r^(n-1)

Substituting the values, we have:

aₙ = 2 * (-2)^(n-1)

To find the first three terms (a₁, a₂, a₃), substitute the values of n into the formula:

a₁ = 2 * (-2)^(1-1) = 2 * (-2)^0 = 2 * 1 = 2

a₂ = 2 * (-2)^(2-1) = 2 * (-2)^1 = 2 * -2 = -4

a₃ = 2 * (-2)^(3-1) = 2 * (-2)^2 = 2 * 4 = 8

To find the 18th term (a₁₈), substitute n=18 into the formula:

a₁₈ = 2 * (-2)^(18-1) = 2 * (-2)^17 ≈ 2 * (-131,072) = -262,144

Therefore, the general formula is aₙ = 2 * (-2)^(n-1), the first three terms are 2, -4, 8, and the 18th term is -262,144.