24 is the factorial of 4 and a composite number, being the first number of the form 23q, where q is an odd prime.
It is the smallest number with exactly eight divisors: 1, 2, 3, 4, 6, 8, 12, and 24. It is a highly composite number, having more divisors than any smaller number. Adding up all the proper divisors of 24 except 4 and 8 gives 24, hence 24 is a semiperfect number.
Subtracting one from any of its divisors (except 1 and 2, but including itself) yields a prime number. 24 is the largest number with this property, for to have this property a number cannot be divisible by a prime greater than three, nor can it be divisible by 9 or 16.
24 has an aliquot sum of 36 and the aliquot sequence (24,36,55,17,1,0).
There are 10 solutions to the equation φ(x) = 24, namely 35, 39, 45, 52, 56, 70, 72, 78, 84 and 90. This is more than any integer below 24, making 24 a highly totient number.
24 is a nonagonal number. This number is also the sum of a twin prime (11 + 13). It is a Harshad number and a semi-meandric number.
Together with the number one, 24 is one of the few numbers n for which the sum of μ(d)d2 over the divisors d of n is equal to itself.[citation needed]
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 a multiple of three. [1]
In 24 dimensions there are 24 even positive definite unimodular lattices, called the Niemeier lattices. One of these is the exceptional Leech lattice which has many surprising properties; due to its existence, the answers to many problems such as the kissing number problem and sphere packing are known in 24 dimensions but not in many lower dimensions. The Leech lattice is closely related to the equally nice length-24 binary Golay code and the Steiner system S(5,8,24) and the Mathieu group M24. One construction of the Leech lattice is possible because of the remarkable fact that 12+22+32+...+242 =702 is a perfect square; 24 is the only integer greater than 1 with this property. These properties of 24 are related to the fact that the number 24 also appears in several places in the theory of modular forms; for example, the modular discriminant is the 24th power of the Dedekind eta function.
The Barnes-Wall lattice contains 24 lattices.
24 is the highest number n with the property that every element of the group of units (Z/nZ)* of the commutative ring Z/nZ, apart from the identity element, has order 2; thus the multiplicative group (Z/24Z)* = {1,5,7,11,13,17,19,23} is isomorphic to the additive group (Z/2Z)3. This fact plays a role in monstrous moonshine.
The 24-cell, with 24 octahedral cells and 24 vertices, is a self-dual convex regular 4-polytope; it has no good 3-dimensional analogue.