What is the probability of choosing a number divisible by $2,3$ or $19$ from $1,2,...,\ 1{,}000{,}000$? 
A number of $1,2,...,\ 1{,}000{,}000$ is randomly selected, each number with the same probability. Specify a suitable probability space and calculate the probability that the chosen number is divisible by $2,3$ or $19$.

The probability space $(\Omega, P) $ would be $\Omega = \{1,2...,\ 1{,}000{,}000 \}$ and $P(A)= \frac{|A|}{1{,}000{,}000}$ with $A \subset \Omega$. Now I just have to find the set $A=\{x: x \in \Omega\ \land x \ \text{divisible by} \ 2, \ 3\ \text{or} \ 19 \}$. But I do not know how to calculate the cardinality of the set. Can someone explain me that?
 A: A number $n\in{\mathbb Z}$ is admissible if it is a multiple of at least one of the primes  $2$, $3$, $19$.  The $(2,3,19)$ divisibility pattern of the  numbers $n\in{\mathbb Z}$ is periodic with period $2\cdot3\cdot19=114$. From $[1..114]$ the $38$ numbers $$6k+1, \ 6k+5\qquad(0\leq k\leq18)$$
are neither multiples of $2$ nor $3$. It is easy to check that among the first multiples of $19$ two numbers belong to this set, namely $19$ and $95$. We can therefore say that  $(114-38)+2=78$ numbers in $[1..114]$ are admissible.
Now $8772\cdot114=1\,000\,008$. When the problem had dealt with all admissible numbers in $[1..1\,000\,008]$ we could answer $p={78\over114}$. Since the given range ends at $1\,000\,000$ we have to be more precise: From the $8772\cdot78=684\,216$ admissible numbers in $[1..1\,000\,008]$ we have to dismiss the admissible numbers in $[1\,000\,001..1\,000\,008]$. A case analysis shows that $5$ numbers have to be dismissed. Therefore the final probability is
$$p={684\,216-5\over 1\,000\,000}=0.684\,211\ .$$
