I was trying to find a series that converged to $1$ and represented the amount of composites up to infinity as a fraction. I had originally tried to sum an infinite series of fractions while guarding for overlap, but found that I was overcompensating for overlap in, Sum of an infinite series of fractions. One answer to that question involved the following: the series described above can be written like this
$\displaystyle\;1 - \prod_{k=1}^n\left(1 - \frac{1}{p_k}\right)\;$,
where $p_k$ represents the $k^{th}$ prime.
I'm wondering whether this is correct, and why? Note that this is not a duplicate of Sum of an infinite series of fractions because I am asking for a full explanation as to why the product represents what it does.