analog of palindromic
- whereas a palindrome
reads the same from right
as from left to right, a strobogrammatic number
looks the same when rotated
through 180 degrees - that is, turned upside down. For this to work, the following assumptions are made:
- 0,1 and 8 appear the same when inverted.
- 6 and 9 are vertical reflections of each other.
- The other digits (2,3,4,5,7) cannot appear in a strobogrammatic number. (2 and 5 are not considered vertical reflections of each other).
Hence the only single digit strobogrammatic numbers are 0, 1 and 8, and for 2 digits there is 11, 69, 88 and 96. From here all other strobogrammatic numbers can be generated:
- One with an odd number of digits can be inserted in the middle of another with an even number of digits to give a third, larger strobogrammatic number with an odd number of digits. For example 11 and 0 gives 101, 101 and 69 gives 61019 etc.
- 2 with an even number of digits can be combined by inserting one in the middle of the other to generate a third strobogrammatic number with an even number of digits. For example 69 and 11 gives 6119 or 1691, 6119 and 88 gives 861198 or 618819 etc.
As a result of this technique an infinite
number of strobogrammatic numbers can be created.
There are several interesting strobogrammatic primes such as 1068901, the smallest to feature each of the 5 digits: see Prime Curios (http://primes.utm.edu/curios/)
In Jerome S. Meyer's "Arithmetriks" (Scholastic 1965) can be found the following strobogrammatic Magic Square - although it is not comprised solely of strobogrammatic numbers, when rotated 180 degrees it retains its magic properties.
96 11 89 68
88 69 91 16
61 86 18 99
19 98 66 81