I encountered this problem:
How many $4$-digit numbers are there that do not have $5$ and have $7$ in the hundreds position? Digits cannot be repeated.
My thinking: first, let's count numbers that do not have $0$. It's going to be $7\cdot 6 \cdot 5$ arrangements. Now, let's count numbers that have $0$ in the tens position. We have two positions open so there are $7 \cdot 6$ arrangements. We get the same number of arrangements for numbers that end with $0$. The total number of arrangements is $7\cdot 6 \cdot 5+ 2\cdot 7 \cdot 6=7\cdot 7 \cdot 6=294$.
However, my friend argues that there are $8$ choices for the last digit, $7$ choices for the tens digits and $6$ choices for the first digit so the total number should be $8\cdot 7 \cdot 6=336$.
I am asking who is right not to prove my friend wrong but to find the truth. Thanks for listening!
294 is correct.
First digit (most significant), can not be 7,0,5, so 7 choices; 3rd digit, cannot be 7,5, and the one chosen for 1st, so 7 choices; 4th digit, 6 choices;
$7\times7\times6=294$