# Strobogrammatic number

A **strobogrammatic number** is a number that, given a base and given a set of glyphs, appears the same whether viewed normally or upside down by rotation of 180 degrees.

In base 10, a legible set of glyphs can be developed where 0, 1 and 8 are symmetrical around the horizontal axis, and 6 and 9 are the same as each other when rotated 180 degrees (such as the digit characters in ASCII using the font Stylus BT). In such a system, the first few strobogrammatic numbers are:

0, 1, 8, 11, 69, 88, 96, 101, 111, 181, 609, 619, 689, 808, 818, 888, 906, 916, 986, 1001, 1111, 1691, 1881, 1961, 6009, 6119, 6699, 6889, 6969, 8008, 8118, 8698, 8888, 8968, 9006, 9116, 9696, 9886, 9966, ... (sequence A000787 in the OEIS)

The strobogrammatic properties of a given number vary by typeface. For instance, in an ornate serif typeface, the numbers 2 and 7 may be rotations of each other; however, in a seven-segment display emulator, this correspondence is lost, but 2 and 5 are both symmetrical.

Using only 0, 1, 6, 8 and 9, 1881 and 1961 were the most recent strobogrammatic years; the next strobogrammatic year will be 6009.

Although amateur aficionados of mathematics are quite interested in this concept, professional mathematicians generally are not. Like the concept of repunits and palindromic numbers, the concept of strobogrammatic numbers is base-dependent (expanding to base-sixteen, for example, produces the additional symmetries of 3/E; some variants of duodecimal systems also have this and a symmetrical *x*). Unlike palindromicity it is also font dependent. But the concept of strobogrammatic numbers is not neatly expressible algebraically, the way that the concept of repunits is, or even the concept of palindromic numbers.

There are sets of glyphs for writing numbers in base 10, such as the Devanagari and Gurmukhi of India in which the numbers listed above are not strobogrammatic at all.

In binary, given a glyph for 1 consisting of a single line without hooks or serifs, all palindromic numbers are strobogrammatic (as well as dihedral), which means (among other things) that all Mersenne numbers are strobogrammatic.

In duodecimal, they are (using inverted two and three for ten and eleven, respectively)

- 0, 1, 8, 11, 2ᘔ, 3Ɛ, 69, 88, 96, ᘔ2, Ɛ3, 101, 111, 181, 20ᘔ, 21ᘔ, 28ᘔ, 30Ɛ, 31Ɛ, 38Ɛ, 609, 619, 689, 808, 818, 888, 906, 916, 986, ᘔ02, ᘔ12, ᘔ82, Ɛ03, Ɛ13, Ɛ83, ...