I am trying to understand natural density and came across the claim (in these notes) that for any prime $p$ and positive integer $k$, the density of integers that are exactly divisible by $p^k$ is: $$\frac{1}{p^k}-\frac{1}{p^{k+1}}$$
However, I also know that if $m$ is a positive integer, $B$ a set of residue classes modulo $m$, and $S$ the set of all positive integers that are congruent to elements of $B$, then $$d(S) = \frac{|B|}{m}$$ where $d(S)$ is the natural density of S. (For example, the set of integers congruent to 1, 4 or 7 modulo 8 has natural density $\tfrac{3}{8}$).
From the formula above, I would think that the density of integers exactly divisible by $p^k$ is simply $\tfrac{1}{p^k}$ since we are looking for all integers congruent to zero modulo $p^k$. I do not understand where the $-\tfrac{1}{p^{k+1}}$ of the claim above comes from.
I also know about the fact that natural density is additive such that $d(S_1 \cup S_2) = d(S_1)+d(S_2)$, but I do not see where that is needed here, nor where it would lead to the result that the density of integers that are exactly divisible by $p^k$ is $\tfrac{1}{p^k}-\tfrac{1}{p^{k+1}}$.
Am I missing some key way to express the set of integers divisible by $p^k$ as a union of sets?
The reason for that subtraction is that the density of integers that are divisible by $p^k,p^{k+1},p^{k+2},\dots$ is $1/p^k$, so the density of integers that are exactly divisible by $p^k$ is the density of integers that are divisible by $p^k,p^{k+1},p^{k+2},\dots$ minus the density of integers that are divisible by $p^{k+1},p^{k+2},p^{k+3},\dots$.
Therefore, the desired density should be $1/p^k-1/p^{k+1}$.