👉 In mathematics, a subfactorial of a natural number n is defined as the factorial of n minus 1. Mathematically, it can be represented as:
n! - (n-1)! = n!
where "!" denotes the factorial function.
For example, if you have the number 5, then its subfactorial would be calculated as follows:
(5! - 4!) = 5
4! - 4!
= 5
24