You can find the sum of the first n terms of a geometric sequence using the formula:
![S_n=(a_1(1-r^n))/(1-r)](https://img.qammunity.org/2023/formulas/mathematics/high-school/rkhz2e5exbn20glbwexc39e4rye8s01xyj.png)
1. First, let's calculate r:
![\begin{gathered} r_1=18-(-6)=24 \\ r_2=-6-2=-8 \\ r=-(8)/(24)=-(1)/(3) \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/fde88f46f2wuzv2oq67qrcjook9c32d07k.png)
Replacing the values in the formula, (n=7 , r=-1/3) we get that:
![S_n=13.51](https://img.qammunity.org/2023/formulas/mathematics/college/m2s0o4mvujayiwpka5l3zycy4pipq5k64k.png)
2. Let's calculate r:
![\begin{gathered} r_1=324-54=270 \\ r_2=54-9=45 \\ r=(r_2)/(r_1)=(45)/(270)=(1)/(6) \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/u90ymbo6vxol45zhhoy6xivhtcwgrq9ym8.png)
Using the formula with the data we have, (n=6 , r=1/6) we get that
![S_n=388.79](https://img.qammunity.org/2023/formulas/mathematics/college/k38w3ownag3gyzig8wxe7eu2h5gifvjcxt.png)