Thought so too but wanted to double check so I wrote a quick and dirty little calculator (JavaScript below, hopefully I didn't make an error). This was the results
Going until 1000
zero:192
one:301
two:300
three:300
four:300
five:300
six:300
seven:300
eight:300
nine:300
Going until 999
zero:189
one:300
two:300
three:300
four:300
five:300
six:300
seven:300
eight:300
nine:300
(function () {
function getStats(n) {
let numbers = [];
let zero = 0, one = 0, two = 0, three = 0, four = 0, five = 0, six = 0, seven = 0, eight = 0, nine = 0;
let i = 1;
while (i <= n) {
numbers.push(i);
i++;
}
let sorted = numbers.join('').split('').sort();
sorted.forEach(number => {
if (number == '0') zero++;
if (number == '1') one++;
if (number == '2') two++;
if (number == '3') three++;
if (number == '4') four++;
if (number == '5') five++;
if (number == '6') six++;
if (number == '7') seven++;
if (number == '8') eight++;
if (number == '9') nine++;
});
console.log(`Going until ${n}\nzero:${zero}\none:${one}\ntwo:${two}\nthree:${three}\nfour:${four}\nfive:${five}\nsix:${six}\nseven:${seven}\neight:${eight}\nnine:${nine}`);
}
getStats(1000);
getStats(999);
})();
Thanks! So basically, I'm right. And I'm really puzzled how an author of a brain teaser book, who is also a professor who lectures on the subject, can miss such a basic understanding in this.
I have no idea how to decode your calculator, but I just tested it by generating the numbers 1-1000 in Excel, then pasting it to Word, then searching the document for each digit and seeing how many results come up. (searching in Excel only shows how many cells contain the result, but it won't show more results for a cell that contains more than one of the digit.)
ETA: My initial answer strategy was based on simple logic. Zero has less, because it can never be a leading number. But the others should be uniform, until 999.