If you are given a geometric sequence like this...
2, 6, 18, 54, 162
the first step is to determine your first term, which is the first number in the sequence. In this case, it is 2. The first term is "a" in the formula.
Next, you have to find the common ratio, which is the number that you multiply by your first term to get the second term. In this case, it is 3. The common ratio is "r" in the formula.
Now, you have enough information to fill in the formula:
an = 2(3) to the power of n-1
If you are simply asked to find the nth term of a geometric sequence, you can stop here.
If you need to find a3,10, or any other number, you need to go further.
Say you are asked to find a5:
a5 = 2(3) to the power of 5-1. Plug in 5 for n to get a5 and 5-1.
a5 = 2(81) Don't multiply 2(3); find 3 to the 4th power,
and multiply that answer by 2.
a5 = 162
I hope this helps :<D