In the known equal ratio sequence {an}, A2 = 6, A5 = 162, find the first n terms and Sn of the sequence {an}

In the known equal ratio sequence {an}, A2 = 6, A5 = 162, find the first n terms and Sn of the sequence {an}

If [A5] / [A2] = Q & # 179;, then Q & # 179; = 27, q = 3, so A1 = 2, then Sn = [A1 (1-1 ^ n] / (1-Q) = 3 ^ n-1