To find the formula for the nth term of a geometric sequence, we can use the formula:
a_n = a_1 * r^(n-1)
where a_1 is the first term of the sequence, r is the common ratio, and n is the position of the term.
In this case, the first term of the sequence is a_1 = 7 and the common ratio is r = (-21)/7 = -3. Plugging these values into the formula, we get:
a_n = 7 * (-3)^(n-1)
Therefore, the formula for the nth term of the geometric sequence is:
a_n = 7 * (-3)^(n-1)