In an LCD display some numbers, when viewed upsidedown, are images of other numbers. For example, 1995 becomes 5661. The fifth number that can be read upside down is 8, and the 15th is 21, which is 12 when viewed upsidedown. What is the millionth number that is meaningful upsidedown?
The number in question are those that contain only 0, 1, 2, 5, 6, 8 and 9seven distinct digits.
If we use base7 numbers as a representation of the ordinal positions of the chosen decimal numbers, we can merely take the base7 version of the ordinal number and translate 3>5, 4>6, 5>8 and 6>9:
ordinal base7 translation
1 1 1
2 2 2
3 3 5
4 4 6
5 5 8
6 6 9
7 10 10
8 11 11
9 12 12
10 13 15
11 14 16
12 15 18
13 16 19
14 20 20
15 21 21
16 22 22
This works because the numerical sequence of the number sets correspond to one another, as we just kept the digits in numeric order.
1,000,000 in base7 is 11333311, so the translation then becomes 11555511, as the millionth number that's meaningful upsidedown. It also happens to have the same value upside down.

Posted by Charlie
on 20130715 12:52:44 