# Thank you Based Base

Can you guess the key to these different base conversions? Here are some examples. See if you can determine the rule and figure out X,Y, and Z

Input      Conversion1 Output    Conversion2 Output    Conversion3 Output

9          111                   9                     9
22         320                   42                    34
298        22120                 EI                    EI
500        40310                 2152                  358
13345      2431001               2C30                  7881
223332     X                     Y                     Z
1010111    270252321             33352235              3312212333


Feel free to give me test values to help you determine. The order in which they are solved is irrelevant but I would say that 1 might be the easiest followed by 3.
EDIT: I think that it's worth clarifying, that each column represents a base conversion rule, not a base itself. My original wording did not make this clear. The important distinction here is that not every number within a column are necessarily in the same base.

• Are the Base2 and Base3 for 298 typos? They are certainly anomalous – Mike Earnest Jul 15 '15 at 18:41
• They are in fact the same, but the values are wrong. I'm very embarassed about these mistakes, I'll double check my new values by hand and update as soon as I can – NeedAName Jul 15 '15 at 18:56
• Ok, corrected my programs. But I will still double check any test values you guys want to run by me. – NeedAName Jul 15 '15 at 19:06

## 1 Answer

Partial answer: Base1 is

the factoradic base, where $d_nd_{n-1}\cdots d_1$ represents the number $$d_n\cdot n!+d_{n-1}\cdot (n-1)!+\dots+d_1\cdot 1!$$ and $0\le d_n\le n$. For example, $9=3!+2!+1!$, and $22=3\cdot3! + 2\cdot 2!$. The value of $X$ is 54210200.