let the number be N
then
N=12a+5 = 2*2*3*a+5
N=18b+5=2*3*3*b+5
N=24c+5=2*2*2*3*c+5
so
N-5=2*2*3*a
N-5=2*3*3*b
N-5=2*2*2*3*c
N-5 must be at least a multiple of 2*2*2 and 3*3. So 8*9=72 is a factor of N-5
In fact, it is the smallest. so the smallest N is 72+5=77
N-5 may have also other factors whose total multiplication is represented by the integer k:
N-5=72k
N=72k+5
Answer: The smallest number is 72
The number, in general, is 72k+5, where k is a positive integer.