Number of possible passwords with $6$ to $8$ characters Question:
Passwords on a computer are $6$ to $8$ characters long, where each character is either an uppercase letter or a digit. How many possible passwords are there if each password must contain at least $1$ digit?
So this is what I did:
Case 1 (passwords of length 6)-
${6 \choose 1} * 10 * (10+26)^5$
Case 2 (passwords of length 7)-
${7\choose 1} * 10 * (10+26)^6$
Case 1 (passwords of length 8)-
${8 \choose 1} * 10 * (10+26)^7$
Total number of all the possible passwords = sum of all the above cases = $6.4251 * 10^{12}$
The answer that I've obtained is incorrect but I'm not too sure what went wrong. So can any kind souls help me out with this?
 A: You are counting every password more than once. For example, think about the password "AB1D3D". The way you are modeling this, you are essentially picking a place to put a digit, then filling in the rest. Using that method there are 2 ways to generate that password choose the 3rd position and set it to 1 then fill in the rest.  Or choose the 5th position set it to 3 and then fill in the rest. In particular you are over counting each password by the number of digits contained in it. 
As perhaps a simpler example, think about this requirement when we just have 2 digit long passwords consisting of only the letters $a$, $b$ and $c$, and every password must contain $a$ at least once. Using the same logic that got you to your current answer you should have ${2 \choose 1} (3)^1 = 6$. However, you can verify that there are only $5$ such passwords $aa,ab,ac,ba,ca$. We obtain the number $6$ because we are double counting the password $aa$.
Try instead to count the complete number of words formed with uppercase letters and digits, and then subtract the number of words without any digits.
