TITLE: Asymptotic Distribution of Primes
QUESTION [5 upvotes]: Given an integer $n$ and let $1\leq m\leq n$ be such that $n$ and $m$ are coprimes define 
$$
\mathcal{N_{n,m}}:=\text{the set of primes $p$ such that $p\equiv{m}\hspace{0.1cm}\mathrm{mod}(n)$}.
$$
Let $\mathcal{P}$ be the set of all primes. I seem to recall that the following result is true:
$$
\varphi(n)^{-1}=\lim_{k\to\infty}{\frac{|\mathcal{N_{n,m}}\cap\{1,2,\ldots,k\}|}{|\mathcal{P}\cap\{1,2,\ldots,k\}|}}.
$$
where $\varphi$ is the Euler's function.
My question is two fold: 

Does anyone have a reference for the previous fact? I was unsuccesful finding it.
Are there finer results along these lines? Second order results?

Thanks!

REPLY [10 votes]: A good way to find the result you mentioned is to search for Dirichlet's (prime number) theorem; while Dirichlet only proved the infinitude of the set in question, nowadays one will frequently find the more precise assertion you mentioned when this result is discussed.  
A more common way to state it is that the number of primes congruent to $m$ modulo $n$ smaller than $x$ is asymptotically equal to $\varphi(n)^{-1} x/log (x) $  (assuming coprimeness as you did), which in combination with the prime number theorem implies what you are looking for.
There are a variety of results related to finer aspects of this problem;
key words e.g. Bombieri-Vinogradov Theorem or Siegel-Walfiz Theorem. 
See for example the wikipedia article on Dirichlet's theorem here which also links to the keywords I mentioned for a quick overview. 
Other than that as Gerry Myerson said any typical book on Analytic Number Theory will contain something on this subject (how much depends of course on the book).

REPLY [5 votes]: It's just the prime number theorem for primes in arithmetic progression, no? Should be in any analytic number theory text that does the prime number theorem.