31 (number)

31 (thirty-one) is the natural number following 30 and preceding 32. It is a prime number.

Mathematics
31 is the 11th prime number. It is a superprime and a self prime (after 3, 5, and 7), as no integer added up to its base 10 digits results in 31. It is the third Mersenne prime of the form 2n − 1, and the eighth Mersenne prime exponent, in-turn yielding the maximum positive value for a 32-bit signed binary integer in computing: 2,147,483,647. After 3, it is the second Mersenne prime not to be a double Mersenne prime, while the 31st prime number (127) is the second double Mersenne prime, following 7. On the other hand, the thirty-first triangular number is the perfect number 496, of the form 2(5 − 1)(25 − 1) by the Euclid-Euler theorem. 31 is also a primorial prime like its twin prime (29), as well as both a lucky prime and a happy number like its dual permutable prime in decimal (13).

31 is the number of regular polygons with an odd number of sides that are known to be constructible with compass and straightedge, from combinations of known Fermat primes of the form 22 n + 1 (they are 3, 5, 17, 257 and 65537).



Only two numbers have a sum-of-divisors equal to 31: 16 (1 + 2 + 4 + 8 + 16) and 25 (1 + 5 + 25), respectively the square of 4, and of 5.

31 is the 11th and final consecutive supersingular prime. After 31, the only supersingular primes are 41, 47, 59, and 71.

31 is the first prime centered pentagonal number, the fifth centered triangular number, and the first non-trivial centered decagonal number.

For the Steiner tree problem, 31 is the number of possible Steiner topologies for Steiner trees with 4 terminals.

At 31, the Mertens function sets a new low of −4, a value which is not subceded until 110.

31 is a repdigit in base 2 (11111) and in base 5 (111).

The cube root of 31 is the value of $\pi$ correct to four significant figures:
 * $$\sqrt[3]31 = 3.141\;{\color{red}38065\;\ldots}$$

The thirty-first digit in the fractional part of the decimal expansion for pi in base-10 is the last consecutive non-zero digit represented, starting from the beginning of the expansion (i.e, the thirty-second single-digit string is the first $$0$$); the partial sum of digits up to this point is $$155 = 31 \times 5.$$ 31 is also the prime partial sum of digits of the decimal expansion of pi after the eighth digit.

The first five Euclid numbers of the form p1 × p2 × p3 × ... × pn + 1 (with pn the nth prime) are prime:


 * 3 = 2 + 1
 * 7 = 2 × 3 + 1
 * 31 = 2 × 3 × 5 + 1
 * 211 = 2 × 3 × 5 × 7 + 1 and
 * 2311 = 2 × 3 × 5 × 7 × 11 + 1

The following term, 30031 = 59 × 509 = 2 × 3 × 5 × 7 × 11 × 13 + 1, is composite. The next prime number of this form has a largest prime p of 31: 2 × 3 × 5 × 7 × 11 × 13 × ... × 31 + 1 ≈ 8.2 × 1033.

While 13 and 31 in base-ten are the proper first duo of two-digit permutable primes and emirps with distinct digits in base ten, 11 is the only two-digit permutable prime that is its own permutable prime. Meanwhile 1310 in ternary is 1113 and 3110 in quinary is 1115, with 1310 in quaternary represented as 314 and 3110 as 1334 (their mirror permutations 3314 and 134, equivalent to 61 and 7 in decimal, respectively, are also prime). (11, 13) form the third twin prime pair between the fifth and sixth prime numbers whose indices add to 11, itself the prime index of 31. Where 31 is the prime index of the fourth Mersenne prime, the first three Mersenne primes (3, 7, 31) sum to the thirteenth prime number, 41. 13 and 31 are also the smallest values to reach record lows in the Mertens function, of −3 and −4 respectively.

The numbers 31, 331, 3331, 33 331, 333  331, 3  333  331, and 33  333  331 are all prime. For a time it was thought that every number of the form 3w1 would be prime. However, the next nine numbers of the sequence are composite; their factorisations are:


 * 333 333  331 = 17 × 19  607  843
 * 3 333  333  331 = 673 × 4  952  947
 * 33 333  333  331 = 307 × 108  577  633
 * 333 333  333  331 = 19 × 83 × 211  371  803
 * 3 333  333  333  331 = 523 × 3049 × 2  090  353
 * 33 333  333  333  331 = 607 × 1511 × 1997 × 18  199
 * 333 333  333  333  331 = 181 × 1  841  620  626  151
 * 3 333  333  333  333  331 = 199 × 16  750  418  760  469 and
 * 33 333  333  333  333  331 = 31 × 1499 × 717  324  094  199.

The next term (3171) is prime, and the recurrence of the factor 31 in the last composite member of the sequence above can be used to prove that no sequence of the type RwE or ERw can consist only of primes, because every prime in the sequence will periodically divide further numbers.

31 is the maximum number of areas inside a circle created from the edges and diagonals of an inscribed six-sided polygon, per Moser's circle problem. It is also equal to the sum of the maximum number of areas generated by the first five n-sided polygons: 1, 2, 4, 8, 16, and as such, 31 is the first member that diverges from twice the value of its previous member in the sequence, by 1.

Icosahedral symmetry contains a total of thirty-one axes of symmetry; six five-fold, ten three-fold, and fifteen two-fold.

In science

 * The atomic number of gallium

Astronomy

 * Messier object M31, a magnitude 4.5 galaxy in the constellation Andromeda. It is also known as the Andromeda Galaxy, and is readily visible to the naked eye in a modestly dark sky.
 * The New General Catalogue object NGC 31, a spiral galaxy in the constellation Phoenix

In sports

 * Ice hockey goaltenders often wear the number 31.

In other fields
Thirty-one is also:
 * The number of days in each of the months January, March, May, July, August, October and December
 * The number of the date that Halloween and New Year's Eve are celebrated
 * The code for international direct-dial phone calls to the Netherlands
 * Thirty-one, a card game
 * The number of kings defeated by the incoming Israelites in Canaan according to : "all the kings, one and thirty" (Wycliffe Bible translation)
 * A type of game played on a backgammon board
 * The number of flavors of Baskin-Robbins ice cream; the shops are called 31 Ice Cream in Japan
 * ISO 31 is the ISO's standard for quantities and units
 * In the title of the anime Ulysses 31
 * In the title of Nick Hornby's book 31 Songs
 * A women's honorary at The University of Alabama (XXXI)
 * The number of the French department Haute-Garonne
 * In music, 31-tone equal temperament is a historically significant tuning system (31 equal temperament), first theorized by Christiaan Huygens and promulgated in the 20th century by Adriaan Fokker
 * Number of letters in Macedonian alphabet
 * Number of letters in Ottoman alphabet
 * A slang term for masturbation in Turkish.