P15430 [Lanquiao Cup 2025 National Python B] Arithmetic Progression Counting
Description
An arithmetic progression is a common mathematical sequence where the difference between any two adjacent terms is a fixed constant, called the common difference. For example, $\{1, 3, 5\}$ is an arithmetic progression with common difference $2$, while $\{2, 3, 5\}$ is not an arithmetic progression. Now, Xiaolan wants to know: if you choose $3$ distinct numbers from the integers from $1$ to $2025$, how many different arithmetic progressions of length $3$ can be formed? Two arithmetic progressions are different if and only if they differ in at least one term. For example, $\{1, 2, 3\}$ and $\{2, 3, 4\}$ are different arithmetic progressions, and $\{1, 2, 3\}$ and $\{3, 2, 1\}$ are also different arithmetic progressions.
Input Format
N/A
Output Format
This is an answer-only problem. You only need to compute the result and submit it. The result is an integer. When submitting your answer, fill in only this integer; any extra content will not receive points.
Explanation/Hint
Translated by ChatGPT 5