7 Given that $p, q$ are coprime positive integers, and $n$ is a non-negative integer. How many different integers can be expressed in the form $i p + j q$, where $i, j$ are non-negative integers, and $i + j \leqslant n$.
(Li Weiguo provided the problem)
If we denote
$$
A(p, q, n)=\{i p+j q \mid i, j \geqslant 0, i+j \leqslant n\},
$$

then the number of elements in $A(p, q, n)$ is
$$
|A(p, q, n)|=\left\{\begin{array}{l}
\frac{(n+1)(n+2)}{2}, \text { if } n < p, \\
\frac{p(2 n-p+3)}{2}, \text { if } n \geqslant p.
\end{array}\right.
$$

According to the definition, we know that
$$
A(p, q, n) \backslash A(p, q, n-1) \subset\{i p+(n-i) q \mid i=1,2, \cdots, n\} .
$$

Notice that
$$
i p+(n-i) q=p(i+q)+q(n-p-i),
$$

and
$$
(i+q)+(n-p-i)=n-p+q \leqslant n-1,
$$

thus
$$
i p+(n-i) q \in A(p, q, n-1) \Leftrightarrow n-p-i \geqslant 0 .
$$

Therefore,
$$
\begin{array}{l}
A(p, q, n) \backslash A(p, q, n-1) \\
=\left\{\begin{array}{ll}
\{i p+(n-i) q \mid i=n-p+1, n-p+2, \cdots, n\}, & \text { if } n \geqslant p, \\
\{i p+(n-i) q \mid i=0,1,2, \cdots, n\}, & \text { if } n<p .
\end{array}\right. \\
\end{array}
$$

Let $a_{n}=|A(p, q, n)|$, we have

Noting that $a_{0}=1$, for $n<p$, we have
$$
\begin{aligned}
a_{n} & =a_{0}+\left(a_{1}-a_{0}\right)+\cdots+\left(a_{n}-a_{n-1}\right) \\
& =1+2+\cdots+(n+1)=\frac{(n+1)(n+2)}{2} ;
\end{aligned}
$$

For $n \geqslant p$, we have
$$
\begin{aligned}
a_{n} & =a_{p-1}+\left(a_{p}-a_{p-1}\right)+\cdots+\left(a_{n}-a_{n-1}\right) \\
& =a_{p-1}+(n-p+1) p=\frac{p(2 n-p+3)}{2} .
\end{aligned}
$$