The
number
A number is a mathematical object used to count, measure, and label. The original examples are the natural numbers 1, 2, 3, 4, and so forth. Numbers can be represented in language with number words. More universally, individual numbers c ...
2,147,483,647 is the eighth
Mersenne prime
In mathematics, a Mersenne prime is a prime number that is one less than a power of two. That is, it is a prime number of the form for some integer . They are named after Marin Mersenne, a French Minim friar, who studied them in the early 17t ...
, equal to 2
31 − 1. It is one of only four known
double Mersenne primes.
The
primality
A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
of this number was proven by
Leonhard Euler
Leonhard Euler ( , ; 15 April 170718 September 1783) was a Swiss mathematician, physicist, astronomer, geographer, logician and engineer who founded the studies of graph theory and topology and made pioneering and influential discoveries in ma ...
, who reported the proof in a letter to
Daniel Bernoulli
Daniel Bernoulli FRS (; – 27 March 1782) was a Swiss mathematician and physicist and was one of the many prominent mathematicians in the Bernoulli family from Basel. He is particularly remembered for his applications of mathematics to mechan ...
written in 1772. Euler used
trial division
Trial division is the most laborious but easiest to understand of the integer factorization algorithms. The essential idea behind trial division tests to see if an integer ''n'', the integer to be factored, can be divided by each number in turn ...
, improving on
Pietro Cataldi
Pietro Antonio Cataldi (15 April 1548, Bologna – 11 February 1626, Bologna) was an Italian mathematician. A citizen of Bologna, he taught mathematics and astronomy and also worked on military problems. His work included the development of contin ...
's method, so that at most 372 divisions were needed. It thus improved upon the previous record-holding prime, 6,700,417, also discovered by Euler, forty years earlier. The number 2,147,483,647 remained the
largest known prime
The largest known prime number () is , a number which has 24,862,048 digits when written in base 10. It was found via a computer volunteered by Patrick Laroche of the Great Internet Mersenne Prime Search (GIMPS) in 2018.
A prime number is a posi ...
until 1867.
In computing, this number is the largest value that a
signed 32-bit
In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in 32-bit units. Compared to smaller bit widths, 32-bit computers can perform large calculation ...
integer field can hold.
Barlow's prediction
At the time of its discovery, 2,147,483,647 was the
largest known prime number
The largest known prime number () is , a number which has 24,862,048 digits when written in base 10. It was found via a computer volunteered by Patrick Laroche of the Great Internet Mersenne Prime Search (GIMPS) in 2018.
A prime number is a posi ...
. In 1811,
Peter Barlow, not anticipating future interest in
perfect number
In number theory, a perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. For instance, 6 has divisors 1, 2 and 3 (excluding itself), and 1 + 2 + 3 = 6, so 6 is a perfect number.
T ...
s, wrote (in ''An Elementary Investigation of the Theory of Numbers''):
Euler ascertained that 231 − 1 = 2147483647 is a prime number; and this is the greatest at present known to be such, and, consequently, the last of the above perfect number
In number theory, a perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. For instance, 6 has divisors 1, 2 and 3 (excluding itself), and 1 + 2 + 3 = 6, so 6 is a perfect number.
T ...
s 30(231 − 1)">.e., 230(231 − 1) which depends upon this, is the greatest perfect number known at present, and probably the greatest that ever will be discovered; for as they are merely curious, without being useful, it is not likely that any person will attempt to find one beyond it.
He repeated this prediction in his 1814 work ''A New Mathematical and Philosophical Dictionary''.
In fact a larger prime was discovered in 1855 by
Thomas Clausen Thomas Clausen may refer to:
* Thomas Clausen (educator) (1939–2002), educator from Baton Rouge, Louisiana
*Thomas Clausen (musician) (born 1949), Danish jazz pianist
*Thomas Clausen (mathematician) (1801–1885), Danish mathematician and astrono ...
(67,280,421,310,721), though a proof was not provided. Furthermore, 3,203,431,780,337 was proven to be prime in 1867.
In computing
The number 2,147,483,647 (or
hexadecimal
In mathematics and computing, the hexadecimal (also base-16 or simply hex) numeral system is a positional numeral system that represents numbers using a radix (base) of 16. Unlike the decimal system representing numbers using 10 symbols, hexa ...
7FFFFFFF
16) is the maximum positive value for a
32-bit
In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in 32-bit units. Compared to smaller bit widths, 32-bit computers can perform large calculation ...
signed binary integer in
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, e ...
. It is therefore the maximum value for variables declared as integers (e.g., as
int
) in many programming languages. The appearance of the number often reflects an error,
overflow condition, or missing value.
The data type
time_t
The C date and time functions are a group of functions in the standard library of the C programming language implementing date and time manipulation operations. They provide support for time acquisition, conversion between date formats, and form ...
, used on operating systems such as Unix, is a signed integer counting the number of seconds since the start of the
Unix epoch
Current Unix time ()
Unix time is a date and time representation widely used in computing. It measures time by the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, the beginning of the Unix epoch, less adjustments m ...
(
midnight
Midnight is the transition time from one day to the next – the moment when the date changes, on the local official clock time for any particular jurisdiction. By clock time, midnight is the opposite of noon, differing from it by 12 hours. ...
UTC of 1 January 1970), and is often implemented as a 32-bit integer. The latest time that can be represented in this form is 03:14:07 UTC on Tuesday, 19 January 2038 (corresponding to 2,147,483,647 seconds since the start of the epoch). This means that systems using a 32-bit
time_t
type are susceptible to the
Year 2038 problem
The year 2038 problem (also known as Y2038, Y2K38, or the Epochalypse) is a time formatting bug in computer systems with representing times after 03:14:07 UTC on 19 January 2038.
The problem exists in systems which measure Unix time â ...
.
On 1 January 2022, a bug was reported for
Microsoft Exchange systems where email delivery would fail. An internal malware scanner (enabled by default since 2013) used the date and time as a signed 32-bit integer. The integer would change during the new year to 2,201,010,001 (with the first two digits representing the year), surpassing the maximum value for this data type.
In video games
The number 2,147,483,647 often becomes a hard limit for various statistics in video games, such as points or money, if they are represented by signed 32-bit integers (rather than
floating-point
In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can b ...
,
double-precision
Double-precision floating-point format (sometimes called FP64 or float64) is a floating-point number format, usually occupying 64 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point.
Flo ...
or
arbitrary-precision
In computer science, arbitrary-precision arithmetic, also called bignum arithmetic, multiple-precision arithmetic, or sometimes infinite-precision arithmetic, indicates that calculations are performed on numbers whose digits of precision are lim ...
).
Going over this limit by legitimate means, or by modding or hacking the game, results in many different outcomes caused by
integer overflow
In computer programming, an integer overflow occurs when an arithmetic operation attempts to create a numeric value that is outside of the range that can be represented with a given number of digits – either higher than the maximum or lower t ...
. The most common outcome is the number "wrapping" into the negatives. Another potential outcome is the game crashing, thus meaning there was no failsafe implemented in the event the value exceeds the signed 32-bit limit -- generally if the underlying engine has undefined behavior, instead of a wrap around behavior, for integer overflow. A well known example in video games is that of
RuneScape
''RuneScape'' is a fantasy massively multiplayer online role-playing game (MMORPG) developed and published by Jagex, released in January 2001. ''RuneScape'' was originally a browser game built with the Java programming language; it was large ...
and
Old School RuneScape
''Old School RuneScape'' is a massively multiplayer online role-playing game (MMORPG) developed and published by Jagex. The game was released on 22 February 2013. When ''Old School RuneScape'' launched, it began as an August 2007 version of the ...
, where the number is used as the maximum amount of coins (or any other item) that a player can hold at once with normal methods, known as a "max cash stack".
In similar cases, where an
unsigned
Unsigned can refer to:
* An unsigned artist is a musical artist or group not attached or signed to a record label
** Unsigned Music Awards, ceremony noting achievements of unsigned artists
** Unsigned band web, online community
* Similarly, the c ...
instead of signed 32-bit integer is used, the limit might be extended to
4,294,967,295
The number 4,294,967,295 is an integer equal to 2 − 1. It is a perfect totient number. It follows 4,294,967,294 and precedes 4,294,967,296. It has a factorization of 3 \cdot 5 \cdot 17 \cdot 257 \cdot 65537.
It is the highest unsigned ...
.
References
External links
Prime curios: 2147483647
{{DEFAULTSORT:2147483647
Integers