The number 24 is very important in number theory (independent on which base (or radix) is used, many serious mathematicians dislike base-dependent things), because: (see https://oeis.org/A018253 and http://math.ucr.edu/home/baez/numbers/24.pdf and https://arxiv.org/pdf/1104.5052.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
"There are at least this many divisors than non-divisors of n in the range [1,n]" is true if and only if n is a proper divisor of 24 (see https://oeis.org/A323383)
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 a 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)
24 is the largest number n such that the smallest composite number coprime to n is exactly n+1 (all such n are exactly 3, 8, 24 (i.e. the unitary divisors > 1 of 24, or the divisors d of 24 such that d+1 is square))
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)
Mod 24 gets the most unfair prime race (remainder r1 and remainder r2, where r1 and r2 are two remainders of the modulo which are coprime to the modulo), see http://math101.guru/wp-content/uploads/2018/09/01-A3-Presentation-v7.3EN-no.pdf (the list in page 14)
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)
((Sum_{0<x<y<n} x*y) mod n)/n depends only on n mod 24, see https://oeis.org/A259748, there are only 8 possible values of it
24 is the only number (besides 1, which is a trivial solution) equal to its Pisano period (https://oeis.org/A001175)
The Pisano period (https://oeis.org/A001175) for all numbers <= 24 are <= 60, but the Pisano period (https://oeis.org/A001175) for the next three numbers (25, 26, 27) are not
24 is the least common multiple of the n such that the regular n-gon can tile the plane with other regular polygons (3, 4, 6, 8, 12)
The first cyclotomic polynomial with a cofficient other than 0 and +-1 is the 105th cyclotomic polynomial, whose degree is 48, and since except for n equal to 1 or 2, they are palindrome polynomials with even degree, thus divided the degree by 2, it is 24
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 smallest base b such that there is a nonsquare k < b such that k*b^n-1 is never prime and proved by combine of covering congruence and algebraic factorization (i.e. k = 6)
There are exactly 24 primes <= 24*4, and 24 is exactly the factorial of 4
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 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 first two n such that 75353*2^n+1 is prime (1 and 25), and if 75353*2^n+1 is prime, then n must be == 1 mod 24 and seems to always be squares (the only other two known such n are 169 and 529), also, its dual form 2^n+75353 is not prime for all small n (such n must be == 23 mod 24, and the smallest such n is 1518191), and 75353 is the only one k in the "Five or Bust!" such that 2*k+1 is prime (i.e. its original form needs only n = 1 to be a prime)
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)
24 is the smallest n such that there is no small prime n-tuple (i.e. n consecutive primes with smallest possible difference of the smallest prime and the largest prime) (see https://oeis.org/A065688 and https://oeis.org/A261324)
The Fermat number F(24) has been the smallest Fermat number with unknown status (prime or composite) for a long time
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)
After 24, there are immediately three true prime powers (i.e. prime powers p^r with r > 1): 25 (=5^2), 27 (=3^3), 32 (=2^5), they are symmetry (5^2 and 2^5) (3^3 and 3^3), also the difference of these three prime powers p^r and 24 are powers of p (i.e. 5^2-24 = 5^0, 3^3-24 = 3^1, 2^5-24 = 2^3), also for these three prime powers p^r, "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) * p^r + 1" are never primes and are (generalized) (m^s)-gonal number for some s (and all generalized polygonal numbers are composite, with only possible exception of indices 0, 1, -1, 2, -2), also "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) * 24 + 1" are always squares, thus also never primes, see https://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Archives/Mathematics/2023_May_20#For_which_natural_numbers_n.2C_this_sequence_contains_infinitely_many_primes.3F
Also, since 24 is 4! (the factorial of 4), and 24+1 is 5^2 (the square of 5), note that 24 = 4! is 1*2*3*4, the product of 4 consecutive numbers, and 4 is the only number n such that the product of n consecutive numbers + 1 is always a square, 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
There are regular polytopes other than simplex and hypercube and cross-polytope in n dimension if and only if n <= 4
The regular n-gon can be extended to any given dimension (e.g. regular triangle -> regular tetrahedron & regular octahedron & regular icosahedron, and regular tetrahedron -> 5-cell & 16-cell & 600-cell, etc.) if and only if n <= 4
For the Harary's generalized tic-tac-toe for n in a straight line, the first player has a win strategy if and only if n <= 4
The Karnaugh map of n variables can use the neighbors of the lattices to show the logical neighbors if and only if n <= 4
A closed curve in a plane always contain n points which from the n vertices of a regular n-gon (i.e. the n roots of x^n=1 in the complex plane) 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)
24 is the kissing number in 4 dimension, i.e. the maximum possible kissing number for 3-dimensional spheres in 4-dimensional Euclidean space, and the 3-dimensional spheres is the dimension of spheres such that the Poincaré conjecture (generalized Poincaré conjecture) is hardest (last) to solve (3-dimensional spheres is exactly the original Poincaré conjecture)
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*(24+1) (i.e. the 24th Pronic number) is 600, which is the largest number of cells (also the largest number of vertices, since the dual of a regular polytope is also a regular polytope) of a regular polytope (in any number of dimensions, except 2 dimensions, which has infinitely many regular polygons) other than simplex and hypercube and demihypercube
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
Euler's calculation (the zeta function regularization and the Ramanujan summation) gives the result of 1+2+3+4+... is -1/12, but if you use the way to prove that 1+2+4+8+... = -1, and write x = 1+2+3+4+... = 1+(2+3+4)+(5+6+7)+(8+9+10)+... = 1+9+18+27+36+... = 1+9*(1+2+3+4+...) = 1+9*x, you will get the solution of x is -1/8, and the difference of -1/12 and -1/8 is -1/24
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)
There are totally 24 trigonometric functions, including inverse trigonometric functions, hyperbolic functions, and inverse hyperbolic functions
Hilbert has 24 hard problems in mathematics (although he decided against including one of them in the published list)
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
24 is the first atomic number (chromium) whose ground-state electron configuration violates the Aufbau principle
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