I didn’t understand this week’s puzzler answer. If the number 1 appears in a six digit odometer 600,000 times (as posited in the puzzler details), then does it not appear in (1 million minus 600,000) times, or 400,00 times?

The question was ‘how many numbers on a 6 digit odometer do not include a 1?’ This is trickier, because the previous question was ‘how many times a 1 occurs’. In the previous example, a number like 211321 would count as three occurrences, a 1 showing up in three different positions. The 600,000 number includes a mathematical calcualtion for each digit position independantly.

The new question is ‘how many numbers do not include a 1’, and is a different set of mathematical rules. They used a statistical formula to determine the number of times a 1 showing up in ANY position.

FYI: This thread belongs under ‘The Show’ topic.

Your forgetting the number of 1’s between 999,999 to 200,000 and between 99,999 to 20,000, and so on.

To do it by that method, you’d need to add it this way:

0-9 = 1 occurence

10-19 = 10 occurences. You had that one.

99-20 = 8 more occurences.

100-199 = 100 occurences. You had this one, too.

999-200 = 18 more occurences.

And so on.

Someone else posted an even easier solution without probability. Each column can have 9 digits without a ‘1’. So the total is just 9 to the 6th power.

***Someone else posted an even easier solution without probability. Each column can have 9 digits without a ‘1’. So the total is just 9 to the 6th power. ***

Yep

count = 0

for i in range(1000000) :

… if not “1” in str(i) : count += 1

…print count

531441

print 9**6

531441