2,147,483,647


The number 2,147,483,647 is the eighth Mersenne prime, equal to 231 − 1. It is one of only four known double Mersenne primes.
The primality of this number was proven by Leonhard Euler, who reported the proof in a letter to Daniel Bernoulli written in 1772. Euler used trial division, improving on Pietro Cataldi'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 until 1867.

Barlow's prediction

At the time of its discovery, 2,147,483,647 was the largest known prime number. In 1811, Peter Barlow, not anticipating future interest in perfect numbers, wrote :
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 numbers , 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, 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 is the maximum positive value for a 32-bit signed binary integer in computing. It is therefore the maximum value for variables declared as integers in many programming languages, and the maximum possible score, money, etc. for many video games. The appearance of the number often reflects an error, overflow condition, or missing value. In December 2014, Google said that PSY's music video "Gangnam Style" had exceeded the 32-bit integer limit for YouTube view count, necessitating YouTube to upgrade the counter to a 64-bit integer.
The data type time_t, used on operating systems such as Unix, is a signed integer counting the number of seconds since the start of the Unix epoch, 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. This means that systems using a 32-bit time_t type are susceptible to the Year 2038 problem.