Consider the set
which consists of all positive integers whose digits strictly increase from left to right. This set is finite. What is the median of the set?
The median is the middle number.
If you have a set of numbers that start with 1 and increase by 1 each time, then the median of an odd number of these numbers is also the mean of the first number and the last number.
(You can check this out by starting with 1 and choosing any odd number of numbers.)
So, if you find the mean of 1 and 123456789 (that is: (1 + 123456789)/2 ), you will also be finding the median.