Probability that n-digit number is divisible by some number(s)? I have came across a number of problems in our probability course that deal with this kind of question. And for two digit numbers I have always "brute-forced" the solution by writing them all out and dividing each. For three digit numbers this is too exhaustive. What is the correct way to approach this kind problem?
Examples:
What is the probability of three digit number being divisible by 3 or 13?
What is the probability of three digit number being divisible by 9 or 11?
 A: There are two principles you need here.  I will use your three digit numbers divisible by $3$ or $13$ as an example.  First is to use floors and ceilings to compute the number of multiples of one of your targets in range.  The smallest number in the range $100$ through $999$ that is a multiple of $3$ is $3 \cdot \lceil \frac {100}3 \rceil$ because you divide $100$ by $3$, round up, and multiply by $3$ again.  The largest multiple is $3 \cdot \lfloor \frac {999}3 \rfloor$ so the number of multiples of $3$ is $\lfloor \frac {999}3 \rfloor - \lceil \frac {100}3 \rceil +1$ where you get the $+1$ because you include both ends.  The number of multiples of $13$ is figured the same way.  The second principle is inclusion-exclusion.  To get the number that are divisible by $3$ or $13$ you add the two figures, but you have counted multiples of $39$ twice (once each way), so you need to subtract them once.
A: These problems often involve the application of two fundamental concepts: (a) If all outcomes in the sample space $S$ are equally likely, then the probability of an event $E$ is the ratio $|E|/|S|$.  (b) Basic counting techniques which allow you to determine the numerator $|E|$; for example, the number of elements in a set $E=A \cup B$ is equal to $|A|+|B|-|A \cap B|$.  
In your example, $S$ is the set of all three digit numbers.  There are $900$ of them. So the denominator is 900.  Let $E \subseteq S$ be the set of all three digit numbers which are divisible by 3 or 13. Let $A$ and $B$ be the set of three digit numbers which are divisible by 3 and by 13, respectively.  The numerator is $|A \cup B|$, which is equal to $|A|+|B|-|A \cap B|$.  To find $|A|$ and $|B|$ you need to divide the number of elements in $|S|$ by 3 and 13, respectively (and decide if you want to take the floor or ceiling - make sure to work out the details so that you are not off by 1).  To compute $|A \cap B|$, you would need to divide $|S$| by $3 \cdot 13=39$.  
Suppose $E$ is the set of three digit numbers which are divisible by 2, 7 or 11. Then, to compute the numerator $|E|$, you would need to use the inclusion-exclusion formula for $|A \cup B \cup C|$.  
In these counting problems, one sees situations where the objective is to compute the cardinality of the union of some events.  One finds that it is difficult to directly compute the cardinality of the union of some events and that it is easier to compute the cardinality of the intersection of these events. So the inclusion-exclusion formula becomes useful.
