# How many length-6 passwords with at least one letter & at least one number can be formed?

How many passwords can be constructed of length 6 which must use at least one letter and at least one number (not case sensitive)?

I got $36^{6}-10^{6}-26^{6}$. But I don't know if I missed something there.

• Assuming the only possible signs are 26 letters and 10 digits, then you're right. – Jakub Konieczny Nov 5 '13 at 19:08

It is correct. This is a direct application of the Subtraction Principle. First count the total number of $6$-length passwords using the $26$ letters in the English alphabet $\{a,b,c,...y,z\}$ and the $10$ numbers $\{0,1,2,...,8,9\}$. We see that there are a total of $36$ usable characters for our password. So the total number of $6$-length passwords is $36^6$. Now we count all the $6$-length passwords using only letters and numbers. There are $26^6$ $6$-length passwords only using letters and $10^6$ $6$-length passwords only using numbers. Thus the number of $6$-length passwords that contain at least $1$ letter and $1$ number is $36^6-26^6-10^6$.