Example 4 Given the sequence $\left\{a_{n}\right\}$ satisfies $a_{1}=2, a_{n+1}=a_{n}^{2}-a_{n}+1\left(n \in \mathbf{N}_{*}\right)$.
Prove: When $n \geqslant 4$,
$$
1-\frac{1}{2^{n+1}}2 \times 3 \times 7 \times 2^{n-4}>2^{n},
$$

i.e., $\sum_{k=1}^{n} \frac{1}{a_{k}}=1-\frac{1}{a_{n+1}-1}>1-\frac{1}{2^{n+1}}$.
Therefore, when $n \geqslant 4$, $1-\frac{1}{2^{n+1}}<\sum_{k=1}^{n} \frac{1}{a_{k}}<1$.