Saturday, 31 March 2018

Factorial Number Base

Today I turned 25199 days old and one of the entries was OEIS A200748: smallest number requiring \(n\) terms to be expressed as a sum of factorials. It took me some time to work out what this really meant and along the way I found out how to represent decimal numbers in factorial base form. As Wikipedia explains:
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 to be multiplied by \((i − 1)\)! (its place value).

So the representation of 25199 in this system is:

4*7! + 6*6! + 5*5! + 4*4! + 3*3! + 2*2! + 1*1! +0*0!

This is shown below as it appears in my Google worksheet:


As can be seen, 4+6+5+4+3+2+1+0 = 25 is the number of terms that OEIS A200748 is referring to and 25199 is the smallest number that can be represented using this system. The initial terms of the sequence are:
0, 1, 3, 5, 11, 17, 23, 47, 71, 95, 119, 239, 359, 479, 599, 719, 1439, 2159, 2879, 3599, 4319, 5039, 10079, 15119, 20159, 25199, 30239, 35279, 40319, 80639, 120959, 161279, 201599, 241919, 282239, 322559, 362879, 725759, 1088639, 1451519, 1814399, 2177279
A modification of the worksheet shows that the smallest number that can be represented using 24 terms is 20159:


Similarly, the smallest number that can be represented using 26 terms is 30239:


The worksheet can be used to confirm all the terms in the OEIS sequence by adding additional rows e.g. the smallest number that can be represented using 41 terms is 2177279:

No comments:

Post a Comment