Tool to write / convert a number from factorial base/number system to base 10 and vice versa from decimal base to factorial base automatically.
Factorial Base - dCode
Tag(s) : Arithmetics
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The factorial base (factoradic) is a writing of the numbers whose position of the figures is defined by the factorial of the position. The nth digit (from the right) of a number is written in base i, and its value in base 10 will be multiplied by $ (i - 1)! $
Example: $ 3210_{(!)} = 3,2,1,0_{(!)} = 3_{(3)} 2_{(2)} 1_{(1)} 0_{(0)} = 23_{(10)} $
All the numbers in factorial base end with 0, thus, it is current to omit it on condition of specifying it clearly.
To write a number $ n $ in factorial base, noted $ n_{(!)} $ Or $ n_! $, perform the successive divisions of $ n $ by $ i $ ranging from 1 to infinity, as long as the result of the Euclidean division is not zero. The factorial notation consists of the remainders obtained in reverse order.
Example: $ 1234_{(10)} = 1,4,1,1,2,0,0_{(!)}= 1411200_{(!)} $
n | i | calculation | remainder |
---|---|---|---|
1234 | 1 | 1234 ÷ 1 = 1234 | 0 |
1234 | 2 | 1234 ÷ 2 = 617 | 0 |
617 | 3 | 617 ÷ 3 = 205 | 2 |
205 | 4 | 205 ÷ 4 = 51 | 1 |
51 | 5 | 51 ÷ 5 = 10 | 1 |
10 | 6 | 10 ÷ 6 = 1 | 4 |
1 | 7 | 1 ÷ 7 = 0 | 1 |
Number conversion from $ n_{(!)} $ (In factorial basis) to base/radix 10, carry out the successive multiplications of its digits (starting from the right) by $ i! $ ranging from 1 to infinity.
Example: $ 1411200_{(!)} = 1 \times 6! + 4 \times 5! + 1 \times 4! + 1 \times 3! + 2 \times 2! + 0 \times 1! + 0 \times 0! = 1234 $
dCode retains ownership of the "Factorial Base" source code. Any algorithm for the "Factorial Base" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Factorial Base" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Factorial Base" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Factorial Base" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Factorial Base on dCode.fr [online website], retrieved on 2025-04-16,