Situation
Recently I received a challenge in college to do:
From the decimal system
0123456789
, using only the numbers that are still readable, find the thousandth number of this system.Example 8 will be the 5th number, the 25th, or the 17th.
Development
Accepted numbers: 0125689
0 1 2 5 6 8 9
0 1 2 3 4 5 6
10 11 12 15 16 18 19
7 8 9 10 11 12 13
20 21 22 25 26 28 29
14 15 16 17 18 19 20
My proposal
Create a base numeric system 7 with these "characters".
Problem
It does not follow the same pattern of conversion of bases , it would be more for Roman numerals tato more complex).
When adding 1+2
the result is 5
, 9+5 = 12
Question
How to manage this system computationally, let's say I want to add 25 + 18. Or any other example.
Obs
I've extrapolated the challenge a bit, which would just do with a loop removing the not allowed numbers, but I think it's a good study.
Searches
Non-Decimal Numbering Systems
#