Open main menu

A dihedral prime or dihedral calculator prime is a prime number that still reads like itself or another prime number when read in a seven-segment display, regardless of orientation (normally or upside down), and surface (actual display or reflection on a mirror). The first few decimal dihedral primes are

2, 5, 11, 101, 181, 1181, 1811, 18181, 108881, 110881, 118081, 120121, 121021, 121151, 150151, 151051, 151121, 180181, 180811, 181081 (sequence A134996 in the OEIS).

The smallest dihedral prime that reads differently with each orientation and surface combination is 120121 which becomes 121021 (upside down), 151051 (mirrored), and 150151 (both upside down and mirrored).

LED-based 7-segment display showing the 16 hex digits.

The digits 0, 1 and 8 remain the same regardless of orientation or surface (the fact that 1 moves from the right to the left of the seven-segment cell when reversed is ignored). 2 and 5 remain the same when viewed upside down, and turn into each other when reflected in a mirror. In the display of a calculator that can handle hexadecimal, d and b are reflections of each other (in seven-segment display representations of hexadecimal digits, b and d are usually represented as lowercase while A, C, E and F are presented in uppercase). Likewise, 3 would become E reflected, and A remains the same, but A and E being even digits, the three or A cannot be used as the first digit because the reflected number will be even. Though 6 and 9 become each other upside down, they are not valid digits when reflected, at least not in any of the numeral systems pocket calculators usually operate in. (Much as the case is with strobogrammatic numbers, whether a number, whether prime, composite or otherwise, is dihedral partially depends on the typeface being used. In handwriting, a 2 drawn with a loop at its base can be strobogrammatic to a 6, numbers that are of little use for the purpose of prime numbers; in the character design used on U.S. dollar bills, 5 reflects to a 7 when reflected in a mirror, while 2 resembles a 7 upside down.)

Strobogrammatic primes that don't use 6 or 9 are dihedral primes. This includes repunit primes and all other palindromic primes which only contain digits 0, 1 and 8 (in binary, all palindromic primes are dihedral). It appears to be unknown whether there exist infinitely many dihedral primes, but this would follow from the conjecture that there are infinitely many repunit primes.

The palindromic prime 10180054 + 8×(1058567−1)/9×1060744 + 1, discovered in 2009 by Darren Bedwell, is 180,055 digits long and may be the largest known dihedral prime as of 2009.[1]

See alsoEdit


  1. ^ Chris Caldwell, The Top Twenty: Palindrome. Retrieved on 2009-09-16


  • Mike Keith. "Puzzle 39.- The Mirrorable Numbers". The prime puzzles & problems connection.