In Self-Descriptor, we found a number ABCDEFGHIJ such that A is the count of how many 0's are in the number, B is the number of 1's, and so on.
I wonder... what if the number didn't have to be 10 digits long?
Find the smallest whole number such that the left-most digit describes the number of 0s in the number, the next digit describes the 1s, etc. Prove that it's the smallest.
(In reply to
re: Is this right? by levik)
I think there is a smaller number, actually: 1210
Proof? Hmmm, okay:
A 1-digit solution:
The first number of any possible solution cannot start with a '0' - to state there are zero 0's is self-contradicting. Therefore a 1-digit solution is impossible.
A 2-digit solution:
Well, what possibilities can there be including just 1's and 0's (and with a non-zero starting digit)? 10 or 11 - neither of these is a valid solution.
A 3-digit solution:
Again, what options have we got here? 1XX or 2XX - 2XX isn't possible as the two X's would have to be 0 for the first digit to be correct, but then the third digit doesn't correctly report the number of 2's. What about 1XX? Well, we've got at least one 1 there. We can't have 11X as that's obviously nonsense. What about 12X? For the first digit to be valid we'd have to go with 120, but again the third digit doesn't correctly report the number of 2's.
A 4-digit solution:
So, eventually we arrive here. And 1210 is a number that does work as a solution. There can be no solutions of smaller length.