Problem (Combinatorics):
In an arithmetic sequence, the first term is 1 and the last term is 19 . The sum of all the terms in the sequence is 70 . How many terms does the sequence have? (An arithmetic sequence is a sequence in which each term after the first is obtained from the previous term by adding a constant. For example, 3, 5, 7, 9 is an arithmetic sequence with four terms.)

Solution:
The sum of the terms in an arithmetic sequence is equal to the average of the first and last terms times the number of terms.

If $n$ is the number of terms in the sequence, then $\frac{1}{2}(1+19) n=70$ or $10 n=70$ and so $n=7$.

Let $n$ be the number of terms in the sequence and $d$ the common difference.

Since the first term is 1 and the $n$th term equals 19 , then $1+(n-1) d=19$ and so $(n-1) d=18$.

Since the sum of the terms in the sequence is 70 , then $\frac{1}{2} n(1+1+(n-1) d)=70$.

Thus, $\frac{1}{2} n(2+18)=70$ or $10 n=70$ and so $n=7$.

Final answer: 7