We fix $n \in \mathbf { N } ^ { * }$ and draw successively and with replacement two integers $p$ and $q$ according to a uniform distribution on $\llbracket 1 , n \rrbracket$. We define the events:
- $A _ { n }$: "We obtain $p = q$".
- $B _ { n }$: "We obtain $q > p$ and $q$ is divisible by $p$".
Show that $$\mathbf { P } \left( B _ { n } \right) = \frac { 1 } { n ^ { 2 } } \sum _ { p = 1 } ^ { n } \left\lfloor \frac { n } { p } \right\rfloor - \frac { 1 } { n } ,$$ and deduce $\mathbf { P } \left( A _ { n } \cup B _ { n } \right)$.