The Multiplication Table Median
If you sort all entries of an n×n multiplication table, the median is not near n²/2. It is much smaller. The reason is the hyperbola — and it makes the Dirichlet divisor problem concrete.
Take a multiplication table. It has entries. What is the median — the 1861st value when all entries are sorted?
Most people guess somewhere near — roughly half of , the maximum entry.
The actual median is .
Less than a quarter of the way up the range. Why?
Setting up the question
The entries of an multiplication table are the products .
There are entries in total (with repetitions). The median is the value such that exactly half the entries satisfy .
So we need: how many pairs with satisfy ?
Call this count . We want the smallest such that .
The count is a lattice point problem
is the number of lattice points with and .
For , this is the number of integer pairs inside the rectangle that also lie below the hyperbola .
For small (where ), the constraint is just — all values work. For large (where ), the constraint is .
The crossover happens at .
Why the median is small
The hyperbola is dense near the axes. When is small, can be as large as — many pairs. When is large, is forced small.
The "density" of lattice points is not uniform across the rectangle. It clusters near the edges where one coordinate is small.
Because of this clustering, you reach half the table's entries at a value far below .
Rough estimate. The total number of pairs with is approximately (from the hyperbola area):
Setting and solving gives roughly — much smaller than .
For : , , giving . The true answer 779 is in the right ballpark — the rough estimate is off because the formula needs more terms, but the order of magnitude is correct.
The exact computation
To find the exact median for a given :
- For each candidate , compute .
- Binary search on in until and .
The binary search takes steps. Each evaluation of takes steps. Total: .
For , this is fast. For large , the hyperbola-splitting trick from Counting Lattice Points reduces each evaluation to .
What this reveals about multiplication tables
The median being at rather than has a concrete interpretation:
Most products in the table are small. The multiplication table is not a uniform sample from . Numbers near 1 are overrepresented (many pairs give small products), while numbers near are underrepresented (only the pair gives the maximum).
This is the same skewness that makes the average number of divisors grow like — both come from the hyperbola's shape.
Worked problems
Problem 1. In a multiplication table, how many entries are ?
Count pairs with and :
For each : .
| 1 | 20 | 10 |
| 2 | 10 | 10 |
| 3 | 6 | 6 |
| 4 | 5 | 5 |
| 5 | 4 | 4 |
| 6 | 3 | 3 |
| 7 | 2 | 2 |
| 8 | 2 | 2 |
| 9 | 2 | 2 |
| 10 | 2 | 2 |
Total: .
So 46 out of 100 entries are . The median is slightly above 20.
Problem 2. Estimate the median of a multiplication table.
, . Rough estimate: .
The true median is around 1369. Again the estimate captures the right scale — much less than 5000.
Problem 3. Prove that at least distinct values appear in an multiplication table.
The entries are distinct values: .
(The actual number of distinct values is much larger — a result of Erdős and others.)
The full asymptotic expansion of — which underlies all of this — is the content of Dirichlet's Divisor Problem.