2. In how many ways can 4 numbers be chosen from the first 1000 natural numbers $1,2, \ldots, 1000$ to form an increasing arithmetic progression?
Solution. Let's find the formula for calculating the number of ways to choose 4 numbers from the first $n$ natural numbers $1,2, \ldots, n$ that form an increasing arithmetic progression. The number of progressions with a difference of 1 is $n-3$ (the first term of the progression can take values from 1 to $n-3$ inclusive), the number of progressions with a difference of 2 is $n-6, \ldots$, the number of progressions with a difference of $d$ is $n-3d$. The difference $d$ satisfies the inequality $1+3d \leq n$ (if the first term of the progression is 1, then its fourth term, $1+3d$, does not exceed $n$). Therefore, the maximum value of the difference is $d_{\max }=\left[\frac{n-1}{3}\right]$ (square brackets denote the integer part of the number). Consequently, the number of progressions that satisfy the condition of the problem is:

$$
(n-3)+(n-6)+\cdots+(n-3k)=\frac{(2n-3k-3)k}{2} \text{, where } k=d_{\max }
$$

For $n=1000$, we have $k=333$ and the number of ways is 166167

Answer: 166167.