# The number of ways of selecting $n$ cards out of unlimited number of cards bearing the number $0,9,3$

If the number of ways of selecting $n$ cards out of unlimited number of cards bearing the number $0,9,3$ so that they can't be used to write the number $903$ is $93$ then $n$ is

-

If you select $n$ cards and you cannot make 903, then you know that those $n$ cards can only be one or two distinct numbers. The number of ways to select $n$ cards that can only be one or two distinct numbers (out of 0, 9, 3) is $$3 + 3(n-1)$$ because there are 3 ways to pick one distinct number ($n$ zeroes, $n$ nines, $n$ threes) and for each pair of numbers are there are $n-1$ ways to pick $n$ cards of those two distinct numbers (pick between 1 and $n-1$ cards of one number, and the rest for the other number).
So you want this quantity to be $93$, which makes $n$ be $31$.