# How many 6-digit alphanumeric passwords are possible with 1) at least and 2) exactly 2 numbers?

For a 6-digit alphanumeric password to be constructed from numbers and uppercase letters, what logic to use and how to calculate the following?

• Number of passwords with exactly 2 numbers

• Number of passwords with at least 2 numbers

I am struggling with Combinatorics but have managed to understand the case with "at least one number" scenario by looking at another MathExchange post, but am totally unable to proceed with this. Other post (link below) doesn't answer it well either. Please help me with the logic and steps required so that I can have a basic working idea that I can use for similar cases (like at least/exactly 3 digits etc.). Thanks.

• In case with at least one number, it's simple to understand as we take the total number of passwords possible and then subtract the number of passwords with only alphabets in them. But this one is totally different and I am unable to get any intuition. Nov 9, 2019 at 8:48

There are $$\binom62$$ choices for the spots of the $$2$$ numbers.
Further the $$2$$ numbers take care of $$10^2$$ possibilities and the $$4$$ letters of $$26^4$$ possibilities .
So we find:$$\binom6210^226^4$$passwords with exactly $$2$$ numbers.
Based on the same principle we find:$$\sum_{k=2}^6\binom6k10^k26^{6-k}$$passwords with at least $$2$$ numbers.