find the number of terms for the following sequence.

125,109,93,.......-115

i got the answer of 15 terms. How do i get it though using a formula?

An=125 - (n*16) the first term is Ao, then A1, A2, ..

To find the number of terms in the given sequence, we can use the formula for the nth term of an arithmetic sequence:

nth term = first term + (n - 1) * common difference

In this case, the first term (a) is 125, and the common difference (d) is the difference between consecutive terms, which is -16.

So, the formula for the nth term becomes:

nth term = 125 + (n - 1) * (-16)

To find the last term, we are given that the last term (L) is -115. We can substitute this into the formula to find the value of n, which represents the number of terms:

-115 = 125 + (n - 1) * (-16)

Rearranging the equation:

-115 - 125 = (n - 1) * (-16)

-240 = (n - 1) * (-16)

Dividing both sides by (-16):

15 = n - 1

Adding 1 to both sides:

n = 15 + 1

n = 16

Therefore, the number of terms in the sequence is 16.