Example 4 Let $a_{1}<a_{2}<\cdots<a_{n}=100$, where $a_{1}, a_{2}, \cdots, a_{n}$ are positive integers. If for any $i \geqslant 2$, there exist $1 \leqslant p \leqslant q \leqslant r \leqslant i-1$, such that $a_{i}=a_{p}+a_{q}+a_{r}$, find the maximum and minimum values of $n$. (Original problem) $\quad$
Solution (1) Clearly, $n \neq 1,2$, so $n \geqslant 3$.
Also, when $n=3$, take $a_{1}=20, a_{2}=60, a_{3}=100$, then $a_{2}=a_{1}+a_{1}+a_{1}$, $a_{3}=a_{1}+a_{1}+a_{2}$, so $n=3$ meets the condition, hence the minimum value of $n$ is 3.
(2) If $a_{1} \equiv 1(\bmod 2)$, then $a_{2}=3 a_{1} \equiv 3 \equiv 1(\bmod 2)$. Suppose for $i \leqslant k(k \geqslant 2)$, $a_{k} \equiv 1(\bmod 2)$, then by $a_{k+1}=a_{p}+a_{q}+a_{r}$, where $(p \leqslant q \leqslant r \leqslant k)$, and the induction hypothesis $a_{p} \equiv 1(\bmod 2), a_{q} \equiv 1(\bmod 2), a_{r} \equiv 1(\bmod 2)$, we have $a_{k+1}=a_{p}+a_{q}+a_{r} \equiv 1+1+1 \equiv 1(\bmod 2)$, so for all $i=1,2, \cdots, n$, $a_{i} \equiv 1(\bmod 2)$, which contradicts $100 \equiv 0(\bmod 2)$, so $a_{1} \equiv 0(\bmod 2)$, and thus $a_{1} \equiv 0, 2(\bmod 4)$;

If $a_{1} \equiv 2(\bmod 4)$, then $a_{2}=3 a_{1} \equiv 6 \equiv 2(\bmod 4)$. Suppose for $i \leqslant k(k \geqslant 2)$, $a_{k} \equiv 2(\bmod 4)$, then by $a_{k+1}=a_{p}+a_{q}+a_{r}$, where $(p \leqslant q \leqslant r \leqslant k)$, and the induction hypothesis $a_{p} \equiv 2(\bmod 4), a_{q} \equiv 2(\bmod 4), a_{r} \equiv 2(\bmod 4)$, we have $a_{k+1}=a_{p}+a_{q}+a_{r} \equiv 2+2+2 \equiv 2(\bmod 4)$, so for all $i=1,2, \cdots, n$, $a_{i} \equiv 2(\bmod 4)$, which contradicts $100 \equiv 0(\bmod 4)$, so $a_{1} \equiv 0(\bmod 4)$, and thus $a_{1} \equiv 0, 4(\bmod 8)$;

If $a_{1} \equiv 0(\bmod 8)$, then $a_{2}=3 a_{1} \equiv 0(\bmod 8)$. Suppose for $i \leqslant k(k \geqslant 2)$, $a_{k} \equiv 0(\bmod 8)$, then by $a_{k+1}=a_{p}+a_{q}+a_{r}$, where $(p \leqslant q \leqslant r \leqslant k)$, and the induction hypothesis $a_{p} \equiv 0(\bmod 8), a_{q} \equiv 0(\bmod 8), a_{r} \equiv 0(\bmod 8)$, we have $a_{k+1}=a_{p}+a_{q}+a_{r} \equiv 0+0+0 \equiv 0(\bmod 8)$, so for all $i=1,2, \cdots, n$, $a_{i} \equiv 0(\bmod 8)$, which contradicts $100 \equiv 4(\bmod 8)$, so $a_{1} \equiv 4(\bmod 8)$, so $a_{1} \geqslant 4$.

Since $a_{1} \equiv 4(\bmod 8)$, then $a_{2}=3 a_{1} \equiv 12 \equiv 4(\bmod 8)$. Suppose for $i \leqslant k(k \geqslant 2)$, $a_{k} \equiv 4(\bmod 8)$, then by $a_{k+1}=a_{p}+a_{q}+a_{r}$, where $(p \leqslant q \leqslant r \leqslant k)$, and the induction hypothesis, $a_{p} \equiv 4(\bmod 8), a_{q} \equiv 4(\bmod 8), a_{r} \equiv 4(\bmod 8)$, we have $a_{k+1}=a_{p}+a_{q}+a_{r} \equiv 4+4+4 \equiv 4(\bmod 8)$, so for all $i=1,2, \cdots, n$, $a_{i} \equiv 4(\bmod 8)$, so for $i \geqslant 2$, $a_{i}-a_{i-1} \equiv 0(\bmod 8)$, so $a_{i}-a_{i-1} \geqslant 8$ (spacing estimation), i.e., $a_{i} \geqslant a_{i-1}+8$.

So $a_{n} \geqslant a_{n-1}+8 \geqslant a_{n-2}+2 \times 8 \geqslant a_{n-3}+3 \times 8 \geqslant \cdots \geqslant a_{1}+(n-1) \times 8 \geqslant 4+(n-1) \times 8=8 n-4$, so $8 n \leqslant a_{n}+4=104$, so $n \leqslant 13$.

Also, when $n=13$, take $a_{i}=8 i-4(i=1,2, \cdots, 13)$, then for $i \geqslant 2$, $a_{i}=a_{i-1}+8=a_{i-1}+a_{1}+a_{1}$, so $n=13$ meets the condition, hence the maximum value of $n$ is 13.

In summary, the minimum value of $n$ is 3, and the maximum value is 13.