The number 24 is very important in number theory (independent on which base (or radix) is used), because: (see https://oeis.org/A018253 and http://math.ucr.edu/home/baez/numbers/24.pdf for some examples)
"m^2 == 1 (mod n) for all integers m coprime to n" is true if and only if n is a divisor of 24
"m-1 is prime for all divisors m>2 of n" is true if and only if n is a divisor of 24
All Dirichlet characters mod n are real if and only if n is a divisor of 24
n is divisible by all numbers less than or equal to the square root of n if and only if n is divisor of 24 (note that for n = 3, 8, 24 (i.e. the unitary divisors > 1 of 24, or the divisors d of 24 such that d+1 is square), the smallest non-divisor of n is exactly the square root of n+1)
The generalized pentagonal numbers (https://oeis.org/A001318, which are the exponents of (1-x)*(1-x^2)*(1-x^3)*(1-x^4)*... and can be used to calculate two important functions in number theory: the partition function (https://oeis.org/A000041) and the sigma function (https://oeis.org/A000203), see pentagonal number theorem and https://en.wikipedia.org/wiki/Divisor_function#Other_properties_and_identities and https://oeis.org/A175003 and https://oeis.org/A238442) are exactly the numbers n such that k*n+1 is square, for k = 24
The formula of the sums of reciprocals of "generalized pentagonal numbers (https://oeis.org/A001318, which are the exponents of (1-x)*(1-x^2)*(1-x^3)*(1-x^4)*... and can be used to calculate two important functions in number theory: the partition function (https://oeis.org/A000041) and the sigma function (https://oeis.org/A000203), see pentagonal number theorem and https://en.wikipedia.org/wiki/Divisor_function#Other_properties_and_identities and https://oeis.org/A175003 and https://oeis.org/A238442) * n + 1" is special (the original formula gives an indeterminate value of 0/0) for n = 24, and this formula needs to calculate hyperbolic functions for n < 24 and need to calculate the ordinary trigonometric functions for n > 24 (assuming we only calculate functions with the domain with the set of the real numbers), see https://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Archives/Mathematics/2023_May_12#Sum_of_the_reciprocals_of_numbers_in_a_set
binomial(n,m) is squarefree for all 0<=m<=n (i.e. all numbers in the n-th row of the Pascal's triangle (the top row is the 0th row, not the 1st row) are squarefree) if and only if n+1 is a divisor of 24
24 is the largest n such that lambda(n) = 2, where lambda is the Carmichael lambda function (or the reduced totient function) (https://oeis.org/A002322)
Number of residues modulo n of the maximum order (https://oeis.org/A111725) is odd if and only if n is divisor of 24
For prime p, p divides k such that for any positive integers x,y coprime to k, x^x == y (mod k) iff y^y == x (mod k) if and only if p-1 is a divisor of 24
24 is the largest n such that there are n consecutive numbers each have exactly n divisors (assuming Schinzel's hypothesis H is true) (also all such n are divisors of 24, but the converse is not true, the only such n are 1, 2, 12, 24, see https://oeis.org/A072507)
24 is the absolute value of tau(2), where tau is the Ramanujan's tau function (https://oeis.org/A000594)
24 is the GCD of all Fermat-Wilson quotients, see https://oeis.org/A197633 (thus, Fermat-Wilson quotients are never primes)
24 is the only number (besides 1, which is a trivial solution) equal to its Pisano period (https://oeis.org/A001175)
24 is the smallest possible period of a covering set of k*2^n+-1 (see https://oeis.org/A257647 and https://oeis.org/A258154 and https://oeis.org/A289110 and https://oeis.org/A257861 and http://irvinemclean.com/maths/siercvr.htm and https://oeis.org/A076336/a076336a.html)
24 is the difference of the largest n such that 2^n-7 is square (15) and the smallest n such that 2^n-7 is prime (39) (see Ramanujan–Nagell equation and https://oeis.org/A060728 and https://oeis.org/A059609)
24 is the difference of the smallest number n > 5 such that there is no x != n such that s(x) = n (28) and the smallest number n > 5 such that there is no x such that s(x) = n (52) (where s(n) = sigma(n)-n (https://oeis.org/A001065)) (see https://oeis.org/A005114)
24 is the only factorial n! which plus 1 is the square (n+1)^2 (although there are three known factorials which plus 1 are squares)
The sequence https://oeis.org/A007240 is replace the term 744 of modular function j as power series in q = e^(2*Pi*i*t) (i.e. https://oeis.org/A000521) to 24
24 is conjectured to be the smallest number k such that the sequence a_0 = any prime number, a_n = s(a_(n-1))+k (where s(n) = sigma(n)-n (https://oeis.org/A001065)) (which is a generalization of Aliquot sequence) is infinite (see http://www.aliquotes.com/autres_processus_iteratifs.html)
Also, since 24 is 4! (the factorial of 4), and many properties in mathematics are true for numbers <= 4 but false for numbers >=5, thus 24 is the product of the numbers such that these properties are true:
The general polynomial equation of degree n has a solution in radicals if and only if n <= 4, see Abel–Ruffini theorem
The complete graph K_n is a planar graph if and only if n <= 4
The alternating group A_n (and hence the symmetric group S_n) is a solvable group if and only if n <= 4
The Conway's Soldiers can advance n rows beyond the initial line if and only if n <= 4
(Possible, not proven) The Fermat number 2^(2^n)+1 is prime if and only if n <= 4
(Possible, not proven) The double Mersenne number 2^(2^(n-th prime)-1)-1 is prime if and only if n <= 4
(Possible, not proven) The Lucas number L(2^n) is prime if and only if n <= 4
Also, outside number theory, the number 24 is also very important in other mathematics subjects, because:
24 dimension is the largest dimension with known kissing number (also all dimensions with known kissing number are divisors of 24, but the converse is not true, the only two divisors of 24 without known kissing number are 6 and 12) (also, 24 is the kissing number in 4 dimension)
The 24-cell, with 24 octahedral cells and 24 vertices (and it is a self-dual polyhedron), is the only one of the six convex regular 4-polytopes which is not the four-dimensional analogue of one of the five regular Platonic solids (i.e. the 24-cell is the only 4-dimension regular polytope which does not have a regular analogue in 3 dimensions), however, it can be seen as the analogue of a pair of irregular solids: the cuboctahedron and the rhombic dodecahedron
24 is the smallest number n such that the graph {2<=x<=n, 2<=y<=n, x divides y} is not planar graph
24 is the maximum number of elements of a solvable symmetric group S_n
1/2(1+2+3+4+...) is infinity, but Euler's calculation (the zeta function regularization and the Ramanujan summation) gives result -1/24
24 is the only n (other than 0 and 1, which are trivial solutions) such that 1^2+2^2+3^2+4^2+...+n^2 is square
24 is the Euler characteristic of a K_3 surface
The Barnes–Wall lattice contains 24 lattices
24 is the order of the cyclic group equal to the stable 3-stem in homotopy groups of spheres: pi_{n+3}(S^n) = Z/24Z for all n >= 5
The modular discriminant Δ(τ) is proportional to the 24th power of the Dedekind eta function η(τ): Δ(τ) = (2Pi)^12*η(τ)^24
24 is the largest number n such that the multiplicative group of integers modulo n is a power of C_2 (the only group with 2 elements)
24 is the smallest possible order of a non-simple group which have no normal Sylow subgroups
24 is the count of different elements in various uniform polyhedron solids
24 is the number of vertices of the elongated square gyrobicupola, which is the only polyhedron such that its faces consist of regular polygons that meet in the same pattern at each of its vertices but lacks a set of global symmetries that map every vertex to every other vertex
There are 24 Niemeier lattices, and they are in a 24-dimensional space
The vertices of the 24-cell honeycomb can be chosen so that in 4-dimensional space, identified with the ring of quaternions, they are precisely the elements of the subring (the ring of "Hurwitz integral quaternions") generated by the binary tetrahedral group as represented by the set of 24 quaternions {+-1, +-i, +-j, +-k, (+-1+-i+-j+-k)/2} in the D_4 lattice
24 is the smallest integer greater than e^Pi (whose i-th power is -1)
Also, outside mathematics, the number 24 is also very important, because:
There are 24 solar terms in a year
24! is an approximation (exceeding by just over 3%) of the Avogadro constant
There are 24 Greek letters
There are a total of 24 major and minor keys in Western tonal music (not counting enharmonic equivalents)
24 is the sum of the 12 quarks (including antiquarks) and the 12 leptons (including antiparticles)
A theory is: 24 is the dimension of the universe (although there are also theories that it is 9, 10, 11, 12, 25, or 26)
In Christian apocalyptic literature it represents the complete Church, 24 is the sum of the 12 tribes of Israel and the 12 Apostles of the Lamb of God