Average of Three Numbers from 1 to 20

Probability · Medium · Free problem

You pick three distinct numbers from the set $\{1, 2, \ldots, 20\}$. What is the probability that one of the three numbers is the arithmetic mean of the other two?

Hints

  1. If one number is the average of the other two, what algebraic relationship must the three numbers satisfy?
  2. The three numbers must form an arithmetic progression. Count APs by their common difference $d$.
  3. For common difference $d$, the AP $(a, a+d, a+2d)$ requires $a + 2d \leq 20$, giving
0 - 2d$ choices for $a$. Sum over $d = 1, \ldots, 9$.

Worked Solution

How to Think About It: If one number is the average of the other two, the three numbers form an arithmetic progression (AP). So the question is really: what fraction of all 3-element subsets of $\{1, \ldots, 20\}$ form an AP? The trick is to count APs systematically by their common difference $d$.

Quick Estimate: Total 3-element subsets: $\binom{20}{3} = 1140$. For each common difference $d$, the number of APs $(a, a+d, a+2d)$ with $a + 2d \leq 20$ is 0 - 2d$. The maximum $d$ is 9 (since \times 10 = 20$ but we need $a \geq 1$). Summing

8 + 16 + \cdots + 2 = 90$. So the probability is $90/1140 \approx 0.079$. That is about 1 in 13.

Approach: Enumerate arithmetic progressions by common difference.

Formal Solution:

Three distinct integers $a < b < c$ from $\{1, \ldots, 20\}$ satisfy "one is the average of the other two" if and only if $b = (a + c)/2$, i.e., $a + c = 2b$. This means $a, b, c$ form an arithmetic progression with common difference $d = b - a = c - b$.

The total number of ways to choose 3 numbers from 20 is:

$\binom{20}{3} = 1140$

For a given common difference $d \geq 1$, the AP is $(a, a+d, a+2d)$ where $a + 2d \leq 20$, so $a$ ranges from

$ to
0 - 2d$. The number of such APs is
0 - 2d$.

The maximum value of $d$ is 9, since d \leq 19$ requires $d \leq 9$.

Total number of APs:

$\sum_{d=1}^{9} (20 - 2d) = 18 + 16 + 14 + 12 + 10 + 8 + 6 + 4 + 2 = 90$

Therefore:

$P = \frac{90}{1140} = \frac{3}{38} \approx 0.0789$

Answer: The probability is $\dfrac{3}{38} \approx 7.89\%$.

Intuition

The key reframe is recognizing that "one number is the average of the other two" is the same as "the three numbers form an arithmetic progression." Once you see that, the problem becomes a clean counting exercise: enumerate APs by their common difference. This is a common pattern in combinatorics interviews -- translating a condition about averages or sums into a structural property (here, equally spaced numbers) that is easier to count.

The result $3/38$ is small because most triples are not equally spaced. As the range grows, the fraction of APs among all triples shrinks further, since total triples grow as $\binom{n}{3} \sim n^3/6$ while APs grow as $\sim n^2/4$.

Open the full interactive solver →