# Sum of the number of terms in an arithmetic sequence formula question.

The nth term formula is that $$a_n = a+(n-1)d$$

How does this formula convert to the formula for the number of terms in an arithmetic sequence which is equal to $$\dfrac{\text{last term-first term}}{ \text{common difference}}+1$$

In other words, how can I prove the formula for the number of terms in an arithmetic sequence? I tried to attempt this but I don't know how to manipulate a formula with a subscript in maths.

Edit: So going on from one of the answers we have $$a_n=a+(n-1)d \Longrightarrow \frac{a_n-a}{d}+1=n$$

So I get it now.

Treat a pronumeral with a subscript as a single unit - if you have $$a_n$$ then you always move them together and you never split them up, almost as if they were just one symbol like $$x$$ or $$\aleph$$.
In this case, you're trying to take $$a_n = a + (n-1)d$$ and rearrange it to express $$n$$ in terms of the other values. So start by subtracting $$a$$ from both sides, then see how to go from there.