24 (twenty-four) is the natural number following 23 and preceding 25.
In mathematics
24 is an even composite number, with 2 and 3 as its distinct prime factors. It is the first number of the form 2q, where q is an odd prime. It is the smallest number with at least eight positive divisors: 1, 2, 3, 4, 6, 8, 12, and 24; thus, it is a highly composite number, having more divisors than any smaller number. Furthermore, it is an abundant number, since the sum of its proper divisors (36) is greater than itself, as well as a superabundant number.
In number theory and algebra
24 is the smallest 5-hemiperfect number, as it has a half-integer abundancy index: 1 + 2 + 3 + 4 + 6 + 8 + 12 + 24 = 60 = × 24 24 is a semiperfect number, since adding up all the proper divisors of 24 except 4 and 8 gives 24. 24 is a practical number, since all smaller positive integers than 24 can be represented as sums of distinct divisors of 24. 24 is a Harshad number, since it is divisible by the sum of its digits in decimal. 24 is a refactorable number, as it has exactly eight positive divisors, and 8 is one of them. 24 is a twin-prime sum, specifically the sum of the third pair of twin primes . 24 is a highly totient number, as there are 10 solutions to the equation φ(x) = 24, which is more than any integer below 24. 144 (the square of 12) and 576 (the square of 24) are also highly totient. 24 is a polite number, an amenable number, an idoneal number, and a tribonacci number. 24 forms a Ruth-Aaron pair with 25, since the sums of distinct prime factors of each are equal (5). 24 is a compositorial, as it is the product of composite numbers up to 6. 24 is a pernicious number, since its Hamming weight in its binary representation (11000) is prime (2). 24 is the third nonagonal number. 24's digits in decimal can be manipulated to form two of its factors, as 2 * 4 is 8 and 2 + 4 is 6. In turn 6 * 8 is 48, which is twice 24, and 4 + 8 is 12, which is half 24. 24 is a congruent number, as 24 is the area of a right triangle with a rational number of sides. 24 is a semi-meandric number, where an order-6 semi-meander intersects an oriented ray in R2 at 24 points. 24 is the number of digits of the fifth and largest known unitary perfect number, when written in decimal: 146361946186458562560000. Subtracting 1 from any of its divisors (except 1 and 2 but including itself) yields a prime number; 24 is the largest number with this property. 24 is the largest integer that is divisible by all natural numbers no larger than its square root. The product of any four consecutive numbers is divisible by 24. This is because, among any four consecutive numbers, there must be two even numbers, one of which is a multiple of four, and there must be at least one multiple of three. 24 = 4!, the factorial of 4. It is the largest factorial that does not contain a trailing zero at the end of its digits (since factorial of any integer greater than 4 is divisible by both 2 and 5), and represents the number of ways to order 4 distinct items: (1,2,3,4), (1,2,4,3), (1,3,2,4), (1,3,4,2), (1,4,2,3), (1,4,3,2), (2,1,3,4), (2,1,4,3), (2,3,1,4), (2,3,4,1), (2,4,1,3), (2,4,3,1), (3,1,2,4), (3,1,4,2), (3,2,1,4), (3,2,4,1), (3,4,1,2), (3,4,2,1), (4,1,2,3), (4,1,3,2), (4,2,1,3), (4,2,3,1), (4,3,1,2), (4,3,2,1). 24 is the only nontrivial solution to the cannonball problem; that is, 12 + 22 + 32 + … + 242 is a perfect square (702). 24 is the only number whose divisors — 1, 2, 3, 4, 6, 8, 12, 24 — are exactly those numbers n for which every invertible element of the commutative ring Z/nZ is a square root of 1. It follows that the multiplicative group of invertible elements (Z/24Z)× = { ±1, ±5, ±7, ±11} is isomorphic to the additive group (Z/2Z)3. This fact plays a role in monstrous moonshine. It follows that any number n relatively prime to 24 (that is, any number of the form 6K ± 1), and in particular any prime n greater than 3, has the property that n2 – 1 is divisible by 24. The modular discriminant is proportional to the 24th power of the Dedekind eta function : .