4. In an arithmetic sequence, $a_{n}=m$ and $a_{m}=n$ are given. Find the term $a_{p}$.
Solution. Since the sequence is arithmetic,

$$
a_{n}=a_{m}+(n-m) d
$$

it follows that $d=-1$. Therefore,

$$
a_{p}=a_{n}+(p-n)(-1)=m+n-p
$$