Search for a tool
Factorial Base

Tool to write / convert a number from factorial base/number system to base 10 and vice versa from decimal base to factorial base automatically.

Results

Factorial Base -

Tag(s) : Arithmetics

Share
dCode and more

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!

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Feedback and suggestions are welcome so that dCode offers the best 'Factorial Base' tool for free! Thank you!

Factorial Base

Cantor Expansion

⮞ Go to: Cantor Expansion

What is factorial base? (Definition)

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.

How to write/convert a number to factorial base?

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_{(!)}$

nicalculationremainder
123411234 ÷ 1 = 12340
123421234 ÷ 2 = 6170
6173617 ÷ 3 = 2052
2054205 ÷ 4 = 511
51551 ÷ 5 = 101
10610 ÷ 6 = 14
171 ÷ 7 = 01

How to convert a number written in factorial base?

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$

How to convert a negative number or a decimal number?

The factorial operator is only defined for positive integers, the factorial of any other number is not defined, therefore cannot be calculated in factorial basis.However, it is possible to extend to decimal numbers using (1/1!), 1/2!, 1/3!, …, 1/n! as a place value after the decimal point.

Source code

dCode retains ownership of the "Factorial Base" source code. Except explicit open source licence (indicated Creative Commons / free), the "Factorial Base" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "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.) and all data download, script, or API access for "Factorial Base" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.

Cite dCode

The copy-paste of the page "Factorial Base" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Factorial Base on dCode.fr [online website], retrieved on 2024-09-14, https://www.dcode.fr/factorial-base

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!