THE FOLD / LOOT / THE-INVENTORY / THE FACTORADIC
THE FACTORADIC
a number in factorial base
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The factorial number system (factoradic) is a mixed-radix notation where the place values are factorials: the digit in position i ranges over 0…i, and the value is Σ di·i!. Every non-negative integer has a unique factoradic form — and, beautifully, the numbers 0…n!−1 are in exact bijection with the n! permutations of n items. Reading a factoradic left to right and repeatedly picking the d-th remaining element (its Lehmer code) unranks the integer into a permutation; the reverse ranks a permutation back to its index. It is the natural coordinate system for permutations.
LIT verified live: for n ≤ 8, factoradic encode/decode round-trips every integer, and rank/unrank is an exact bijection between [0, n!) and the n! permutations (window.__factoradic). FIG no framing; the mixed-radix conversion and the permutation rank/unrank run in-browser.
LIT verified live: for n ≤ 8, factoradic encode/decode round-trips every integer, and rank/unrank is an exact bijection between [0, n!) and the n! permutations (window.__factoradic). FIG no framing; the mixed-radix conversion and the permutation rank/unrank run in-browser.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-inventory — a single number that catalogues each permutation by its index, and hands it back on demand. AVAN (AI) built the instrument: the factorial-base conversion, the Lehmer-code unrank, the rank, and the bijection check.
Credit as content: the factorial number system (Laisant, 1888; Lehmer). The weave: David names the inventory; I confirm the mixed-radix index is a perfect bijection with the permutations.
Credit as content: the factorial number system (Laisant, 1888; Lehmer). The weave: David names the inventory; I confirm the mixed-radix index is a perfect bijection with the permutations.
3 ONE DIMENSION
A number in factorial base: place values 1!, 2!, 3!, … with digit i bounded by i — a unique representation.
4 TWO DIMENSIONS · INTERACTIVE
Pick an index m; see its factoradic digits and the exact permutation it unranks to — and back again.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the permutation indexed by m.
AVAN’s addition (the inverse-companion): don’t list permutations — number them. The inverse of ‘enumerate all n!’ is ‘a mixed-radix integer names each permutation, and picking the d-th remaining element unranks it.’ Magenta is a permutation; green is its unique rank. Permutations, coordinatized.
LIT Genuine factorial number system / Lehmer-code ranking (Charles-Ange Laisant, 1888; D. H. Lehmer). Verified live: for n≤8, Σ dᵢ·i! encode/decode round-trips every integer, and the Lehmer-code unrank / rank is an exact bijection between [0,n!) and the n! permutations (every index yields a distinct permutation and back) (window.__factoradic.numberRoundTrip, .permBijection).
FIG No framing: the mixed-radix conversion and the permutation rank/unrank run in-browser. The AVAN inverse is honest — instead of enumerating all n! permutations, a mixed-radix integer names each one, and picking the d-th remaining element unranks it. Magenta is a permutation; green is its unique rank. Permutations, coordinatized.
FIG No framing: the mixed-radix conversion and the permutation rank/unrank run in-browser. The AVAN inverse is honest — instead of enumerating all n! permutations, a mixed-radix integer names each one, and picking the d-th remaining element unranks it. Magenta is a permutation; green is its unique rank. Permutations, coordinatized.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-INVENTORY · David Lee Wise (ROOT0), with AVAN