In combinatorics, the factorial number system, also called factoradic, is a mixed radix numeral system adapted to numbering permutations. It is also called factorial base, although factorials do not function as base, but as place value of digits. By converting a number less than n! to factorial representation, one obtains a sequence of n digits that can be converted to a permutation of n elements in a straightforward way, either using them as Lehmer code or as inversion table representation; in the former case the resulting map from integers to permutations of n elements lists them in lexicographical order. General mixed radix systems were studied by Georg Cantor. The term "factorial number system" is used by Knuth, while the French equivalent "numération factorielle" was first used in 1888. The term "factoradic", which is a portmanteau of factorial and mixed radix, appears to be of more recent date. Definition The factorial number system is a mixed radix numeral system: the i-th digit from the right has base i, which means that the digit must be strictly less than i, and that (taking into account the bases of the less significant digits) its value is to be multiplied by ! (its place value). From this it follows that the rightmost digit is always 0, the second can be 0 or 1, the third 0, 1 or 2, and so on . The factorial number system is sometimes defined with the 0! place omitted because it is always zero . In this article, a factorial number representation will be flagged by a subscript "!", so for instance 3:4:1:0:1:0! stands for 354413021100, whose value is 3×5! + 4×4! + 1×3! + 0×2! + 1×1! + 0×0! ((((3×5 + 4)×4 + 1)×3 + 0)×2 + 1)×1 + 0 46310. (The place value is the factorial of one less than the radix position, which is why the equation begins with 5! for a 6-digit factoradic number.) General properties of mixed radix number systems also apply to the factorial number system. For instance, one can convert a number into factorial representation producing digits from right to left, by repeatedly dividing the number by the radix (1, 2, 3, ...), taking the remainder as digits, and continuing with the integer quotient, until this quotient becomes 0. For example, 46310 can be transformed into a factorial representation by these successive divisions: The process terminates when the quotient reaches zero.