# Why why the natural density of the set $\{ n \mid n \equiv n_{0}\mod{m}\}$ is $\frac{1}{m}$.

The natural density of a set $S$ is defined by $\displaystyle\lim_{x \to{+}\infty}{\frac{\left | \{ n\le x \mid n\in S \} \right |}{x}}$.

This is maybe a silly question, but I got a confusion with this definition. And I really need understand why the natural density of the set $\{ n \mid n \equiv n_{0}\mod{m}\}$ is $\dfrac{1}{m}$.

Thanks!

-
Because for the numerator $N$ $\frac{x}{m} \le N \le \frac{x}{m} + 1$ –  Harold Jun 6 '13 at 11:31

I think you should add the condition $n\geq 0$ here.

Let $n_{0}=pm+k$, where $0\leq k< m$. We know that $x\to\infty$. Let $x=rm+t$, where $0\leq t< m$.

Then $\frac {n|n\equiv n_{0}\text { and } n\in S}{x}=\frac{r+1}{rm+t}$ if $t\geq k$, and $\frac {r}{rm+t}$ if $t<k$.

In either case, as $x\to \infty$, the fractions simplify to $\frac {1}{m}$.

-

It is relatively easy to show that if you have an infinite set $A$ and you write it in an increasing order, i.e., $$A=\{a_1<a_2<\dots<a_k<\dots\}$$ then $$d(A)=\lim\limits_{k\to\infty} \frac{k}{a_k}.$$

If you apply this to your case, you get the required density. (This fact is also mentioned in the Wikipedia article.)

-