Natural density (source code)

= Natural density
{title2=$d(S)$}
{wiki}

For $S\subseteq\mathbb Z_{\geq0}$, its natural density, when it exists, is $d(S)=\lim_{N\to\infty}|S\cap\{0,\ldots,N-1\}|/N$.