Concept question since it's a slow night here.
Quick aside for those not familiar with any numbering system besides base 10, base 2 means every digit in a number can be either 1 or 0, giving two possibilities. Base 4 would allow 3, 2, 1 or 0.
Changing it into base 10 is the sum of number*base^(position-1) where position starts at 1 at the right side of the number and increases as you go to the left, 11 in base 3 would be 1 * 3^0 or 1 + 1 * 3^1 or 3, for a total of 4.
There's not a whole lot of lexicon for what I'm trying to ask, so for some examples, given a base of 4, you can subdivide it into 2 'bits' of base 2, and the max value of that (11 in base 2) is equal to the max value of one digit of base 4 (3)
For terms, I'm going to describe the number of digits in the lower base as the 'count'. For the reduced base, in the above case base 2, I'm going to call the 'subbase' since it's a subdivide of the original base 4.
So for 4, the only subbase available is 2, with a count of 2 bits.
However, if we raise that number, say to a base of 16, we have another interesting development:
You can still use a subbase of 2, and with a count of 4, we end up with the same as the max single digit value of base 16, but we can also use a base of 4, and with a count of 2 (33) we end up again with the max single digit value of base 16.
There's another layer to that as well, a base of (2^2) can be split into a subbase of 2 with two digits, and a base of (2^(2^2)) can be split up into a subbase of 2 with a count of 4, or a subbase of 4 with a count of two. This applies up to 256 with subbase:count of 2:8, 4:4, and 16:2.
And just for good measure, this applies to other bases as well, so 9, base 3^2 can be split into a subbase of 3 with a count of 2.
So what do you do when you have have an almost prime (94 splits into 47 (prime) and 2) and you're trying to find the best ways to split it up into subbases? What can I subbase with to keep most of the potential of base 94, while still subdividing it into more values per digit of the original base.
And no, subbasing with 94 doesn't count.
For why I'm doing this, data stores accept 94 characters without padding (Making them larger than one character), so I'm trying to get the most mileage I can of an effective base 94 save file of 260k bytes. If I can split it into two values, I can save 520k values so long as they do not exceed the new subbase's max value.

1 comment
convert the binary data into base 94. each digit encodes log2(94) bits on average.