Factored radix numbers
- Four digits to sequentially index a growing collection of entities,
- a strong preference for human-friendly decimal,
- but the possibility of reaching 10000 and regret at not having chosen hexadecimal or vigesimal.
What to do?
For me, the question became theoretical, but I considered it long enough to define a numeral system, factored radix numbers (pdf), as well as a filter program to do conversions between FR and decimal.
The essence of the answer is simple: Use decimal up to 9999. For higher numbers, e.g., 123456, remove a prefix (12) to leave the allowed number of characters (4) in the stem (3456). Then encode the prefix within the stem in a manner somewhat analogous to digital steganography. However, obscurity is not the goal. Instead, make it easy to recover both the stem and the prefix - much easier than converting base 20 to decimal.
For the details, see the article linked above.