Dear Math community,
A good way to ask my question is to simply illustrate this with an example.
Let's have a binary representation of the first 16 numbers {0-15}
['0000', '0001', '0010', '0011', '0100', '0101', '0110', '0111', '1000', '1001', '1010', '1011', '1100', '1101', '1110', '1111']
Now, converting a decimal number $ (X)_{10} $ to a binary expression $ (X)_{2} $ such as demonstrated above is fairly easy as every number can be representated in such a way:
$$ (0000)_2 = 0, (0001)_2 = 1, ..., (1110)_2 = 14, (1111)_2 = 15 $$
Let's use the same binary representation, but now with a different base:
$$ (0000)_3 = 0, (0001)_3 = 1, ..., (1110)_3 = 39, (1111)_3 = 40 $$ $$ (0000)_4 = 0, (0001)_4 = 1, ..., (1110)_4 = 84, (1111)_4 = 85 $$ $$ (0000)_8 = 0, (0001)_8 = 1, ..., (1110)_8 = 584, (1111)_8 = 585 $$ $$ (0000)_9 = 0, (0001)_9 = 1, ..., (1110)_9 = 819, (1111)_9 = 820 $$
Not every number can be represented in such a way, but what would be the most efficient way to find out:
- Can a decimal number $(X)$ be expressed in the form of $(0,1)$ using a certain radix/base $(B)$ where $X \neq B$ and $B \neq 2$ ?
- If so, are there multiple bases? Is there a way to find all of them?
So, given an arbitrary number what is its binary representation using a base other than 2?
Example: $ 39339_{10} = (1011)_{34} $
I've asked a similar question ca. 5 years ago, but the answers didn't fit every situation and aren't quite fitting for this case as well. (How to find the highest [natural] radix base of a given number with a natural output)
So any input on this would be highly appreciated.
Thank you.
Edit:
To be clear, the point of this is not to just simply convert a decimal into a binary representation, but to find out, through some mathematical property of distinct proof the potential bases that could be used given an arbitrary integer for some binary representation of it.
Any (huge) brute-force approach deviates from the core of the question as that you could simply imagine how inefficient it would be to apply this using big integers. The underlying essence of this is to explore and apply some intrinsic method/mathematical way of doing so.
Polynomials seem to be a promising route though.
Not yet an answer, but a comment/an idea how to begin
Hmm, if $x$ is your number, then the representation in base $b$ using only digits $(0,1)$ means you can write $$ x = b^{j_1} { b^{k_1}-1 \over b-1 } + b^{j_1} { b^{k_1}-1 \over b-1 } + ... b^{j_n} { b^{k_n}-1 \over b-1 } \tag 1 $$ Here the $k_1,k_2,...,k_n$ give lenghtes of consecutive $1$ in your radix-system, while the differences between the $j_1,j_2,...,j_n$ the lengthes of consecutive $0$ .
And then "normalizing": $$ x \cdot (b-1) = b^{j_1} ( b^{k_1}-1 ) + b^{j_2} ( b^{k_2}-1) + ... b^{j_n} ( b^{k_n}-1 ) \tag 2 $$ and put in a (so-to-say) "iterated factoring": $$ x \cdot (b-1) = (...(( ( b^{k_1}-1 )b^{j'_1} + ( b^{k_1}-1))b^{j'_2} + ... +( b^{k_n}-1 )) b^{j'_n} \tag 3 $$ where $j'_{n-1}=j_{n-1}-j_n$ and so on.
From this you try to develop $x(b-1)$ backwards with modular arithmetic:
and repeat as long as possible/meaningful.
Disclaimer: This is at the moment just handwaving, so not meant as complete answer.