5040 (number)

5040 (five thousand [and] forty) is the natural number following 5039 and preceding 5041.

It is a factorial (7!), a superior highly composite number, abundant number, colossally abundant number and the number of permutations of 4 items out of 10 choices (10 × 9 × 8 × 7 = 5040). It is also one less than a square, making (7, 71) a Brown number pair.

Philosophy
Plato mentions in his Laws that 5040 is a convenient number to use for dividing many things (including both the citizens and the land of a city-state or polis) into lesser parts, making it an ideal number for the number of citizens (heads of families) making up a polis. He remarks that this number can be divided by all the (natural) numbers from 1 to 12 with the single exception of 11 (however, it is not the smallest number to have this property; 2520 is). He rectifies this "defect" by suggesting that two families could be subtracted from the citizen body to produce the number 5038, which is divisible by 11. Plato also took notice of the fact that 5040 can be divided by 12 twice over. Indeed, Plato's repeated insistence on the use of 5040 for various state purposes is so evident that Benjamin Jowett, in the introduction to his translation of Laws, wrote, "Plato, writing under Pythagorean influences, seems really to have supposed that the well-being of the city depended almost as much on the number 5040 as on justice and moderation."

Jean-Pierre Kahane has suggested that Plato's use of the number 5040 marks the first appearance of the concept of a highly composite number, a number with more divisors than any smaller number.

Number theoretical
If $$\sigma(n)$$ is the sum-of-divisors function and $$\gamma$$ is the Euler–Mascheroni constant, then 5040 is the largest of 27 known numbers for which this inequality holds:
 * $$\sigma(n) \geq e^\gamma n\log \log n $$.

This is somewhat unusual, since in the limit we have:
 * $$\limsup_{n\rightarrow\infty}\frac{\sigma(n)}{n\ \log \log n}=e^\gamma.$$

Guy Robin showed in 1984 that the inequality fails for all larger numbers if and only if the Riemann hypothesis is true.

Interesting notes

 * 5040 has exactly 60 divisors, counting itself and 1.
 * 5040 is the largest factorial (7! = 5040) that is a highly composite number. All factorials smaller than 8! = 40320 are highly composite.
 * 5040 is the sum of 42 consecutive primes (23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59 + 61 + 67 + 71 + 73 + 79 + 83 + 89 + 97 + 101 + 103 + 107 + 109 + 113 + 127 + 131 + 137 + 139 + 149 + 151 + 157 +163 + 167 + 173 + 179 + 181 + 191 + 193 + 197 + 199 + 211 + 223 + 227 + 229).
 * 5040 is the least common multiple of the first 10 multiples of 2 (2, 4, 6, 8, 10, 12, 14, 16, 18 and 20).