Factorial number system

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[1] 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.

[2] The term "factorial number system" is used by Knuth,[3] while the French equivalent "numération factorielle" was first used in 1888.

[4] The term "factoradic", which is a portmanteau of factorial and mixed radix, appears to be of more recent date.

stands for (The place value is the factorial of one less than the radix position, which is why the equation begins with 5!

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.

The following sortable table shows the 24 permutations of four elements with different inversion related vectors.

(the latter often called Lehmer code) are particularly eligible to be interpreted as factorial numbers.

The rightmost column shows the digit sums of the factorial numbers (OEIS: A034968 in the tables default order).

Thus using letters A–Z to denote digits 10, 11, 12, ..., 35 as in other base-N make the largest representable number 36 × 36! − 1.

For arbitrarily greater numbers one has to choose a base for representing individual digits, say decimal, and provide a separating mark between them (for instance by subscripting each digit by its base, also given in decimal, like 24031201, this number also can be written as 2:0:1:0!).

− 1 (or equivalently the numbers with n digits in factorial representation) and permutations of n elements in lexicographical order, when the integers are expressed in factoradic form.

Think of this new list of choices as zero indexed, and use each successive factoradic digit to choose from its remaining elements.

in factoradic, and that number picks out digits (4,0,6,2,1,3,5) in turn, via indexing a dwindling ordered set of digits and picking out each digit from the set at each turn: A natural index for the direct product of two permutation groups is the concatenation of two factoradic numbers, with two subscript "!"s.

Unlike single radix systems whose place values are basen for both positive and negative integral n, the factorial number base cannot be extended to negative place values as these would be (−1)!, (−2)!

There is also a non-terminating equivalent for every rational number akin to the fact that in decimal 0.24999... = 0.25 = 1/4 and 0.999... = 1, etc., which can be created by reducing the final term by 1 and then filling in the remaining infinite number of terms with the highest value possible for the radix of that position.

In the following selection of examples, spaces are used to separate the place values, otherwise represented in decimal.

The factorial numbers of a given length form a permutohedron when ordered by the bitwise relation

These are the right inversion counts (aka Lehmer codes) of the permutations of four elements.