today's problem: how many numbers between 10000 and 100000 inclusive contain exactly 2 digits (by this i mean 22322 counts, but 12333 does not) can you find a general formula for how many there are between 10^n and 10^(n+1) ?
\(\LARGE \mathtt{\color{pink}{4} \color{lightblue}{2}}\)
there are more i think.
haha oh yes 42 is the answer to everything i suppose
Basically, you're selecting five digits. There are two cases. In both, the first digit can be any number. In one, the second digit is a different number, in the other, it's the same. If it's a different number, then the next three digits must be one of those two numbers. For this case you have \(10\cdot9\cdot2\cdot2\cdot2\). For the second case, we again have two cases. In one, the third digit is the same as the first two. In the other, it's different. This same pattern repeats for the fourth digit. So we have: \(10\cdot1\cdot9\cdot2\cdot2\), \(10\cdot1\cdot1\cdot9\cdot2\), and \(10\cdot1\cdot1\cdot1\cdot9\). These four cases sum together to make \(720+360+180+90=1350\). We add one, because we didn't count 100000 yet, and the answer is 1351. When generalizing this result, we have a sequence represented by \[\large \sum_{n=0}^x90\cdot2^n\] where x is equal to the number of digits minus two. We will again have to add one to the result of this sum in each case to include the upper bound.
hmm i got 1216 for the first part.. consider out two numbers A and B which can be {1,2,3,4,5,6,7,8,9,0} we have to include all permutations of all pairs of the following: AAAAB AAABB AABBB ABBBB this comes to 10C2*(5C1+ 5C2 + 5C3 + 5C4) = 45*(5 + 10 + 10 + 5) but since we included zero, and we cant start with zero we need to exclude all those starting with zero, so setting A to 0 and then counting combinations starting with A: 9C1(4C1+4C2+4C3+4C4) then add 1 for the remaining number: 100000 45(5+10+10+5)- 135 + 1 = 1216
You're right, mine included numbers starting with zero. That's what I get for doing math after getting home from the bars.
i sympathise, this was my solution from earlier, would have no hope in the state i am in now :L
Join our real-time social learning platform and learn together with your friends!