3. Petya is coming up with a password for his smartphone. The password consists of 4 decimal digits. Petya wants the password not to contain the digit 7, and at the same time, the password should have at least two (or more) identical digits. In how many ways can Petya do this?
# Answer 3537.

Solution: The total number of passwords not containing the digit 7 will be $9^{4}=6561$. Among these, 9x8x7x6=3024 consist of different digits. Therefore, the number of passwords containing identical digits is 6561-3024=3537 passwords.