What is the largest whole number that you can form, such that no pair of consecutive digits occurs more than once? For example you can have 34543, but you cannot have 34534 as the pair "34" occurs twice.
I believe this is the largest number that meets that criteria:
The number has all 100 possible number pairs, from 00 to 99. Furthermore, the number starts with 99, the largest pair, and ends with 09, one of the smallest. Note: I used the zeros in bold to break up the string of numbers so that you can see the method I used to get to my solution.
Because 9989 is the largest possible 4 digit start, and then 7 is the largest number that can come next, I used this strategy to get the rest of the number. 99 to 89 to 79 etc.
What is the correct answer depends on the number system that is used.
In Hexadecimal, a common thing to display data from computers, the highest number is (with a space separating each block)
FFEFDFCFBFAF9F8F7F6F5F4F3F2F1F0 EEDECEBEAE9E8E7E6E5E4E3E2E1E0 DDCDBDAD9D8D7D6D5D4D3D2D1D0 CCBCAC9C8C7C6C5C4C3C2C1C0 BBAB9B8B7B6B5B4B3B2B1B0 AA9A8A7A6A5A4A3A2A1A0 9989796959493929190 88786858483828180 776757473727170 6656463626160 55453525150 443424140 3323130 22120 110 0F
In Decimal, as you usually use it in normal math, it is
9989796959493929190 88786858483828180 776757473727170 6656463626160 55453525150 443424140 3323130 22120 110 09
Nonal however is a little shorter, as is Octal (like it was used in some game cartridges):
88786858483828180 776757473727170 6656463626160 55453525150 443424140 3323130 22120 110 08
776757473727170 6656463626160 55453525150 443424140 3323130 22120 110 07
The order of numbers is simply evaluated by a recipe:
For any number system that has more than a single numeral (e.g.
0) each block is set up the same way: H is the absolute highest number that is possible. The highest not-yet used number is M with M<=H and each subsequent M being the former M-1.
Each block with M>0 is made by stacking doublets of (M-N)M, where N is 0 to (M-1)
When N=(M-1) is reached, the block terminates and is ended with a 0 (but no further M) so that each block looks like MM(M-1)M...1M0
As a result, M=2 always is 22120 and M=1 is 110
The last, M=0 termination block, needs to be 0H.
In Binary, the largest possible number indeed does adhere to the exact same recipe, it's simply enough...
the M=1 and termination blocks
Note that this system fails to produce meaningful output for position-dependent di-character combinations such as roman numerals: ML (1050) is a valid roman number as is CML (950), but LM is not a valid roman number.
Number systems that include potencies of 10 as special characters can create wildly larger numbers: For example Japanese numerals have special characters for 100, 1000, 10000, 100-million (10^8), 10^12 and 10^16. However, the special rules for them don't allow some of them (the latter 3) to appear more than once and then need to be placed in a non- leading position for maximum effect.