Probability in number theory I am hearing that there are some great applications of probability theory (or more general measure theory) to number theory. Could anyone recommend some good book(s) on that (or other types of references)?
Please one source per answer as I would like to make this community wiki.
 A: Statistical Independence in Probability, Analysis, and Number Theory, by Mark Kac -- an amazingly potent piece of mathematical writing given its rather minuscule size.  While now slightly out of date in terms of best possible bounds, he fairly seamlessly collects some of the most important results in analytic number theory.  This was the first book (for me) that calculated not only expected values for the standard arithmetic functions (various divisor-counting functions, sum-of-divisors function,etc.), but also the expected deviation, in terms of a probability distribution function, from this value.  These types of results don't get emphasized enough -- almost as important as knowing asymptotic values for a quantity in question is knowing how frequently the value is far from that asymptote.
A: Also, for a very brief (but excellent!) introduction, see:
http://algo.inria.fr/seminars/sem96-97/deshouillers.pdf
Baez-Duarte, wrote a beautiful article, giving us a "probabilistic" derivation of the Hardy-Ramanujan asymptotic for p(n). He's essentially interpreting "probabilistically" the saddle-point method, and this type of thinking was central to me for a long time. 
The exact reference for his paper is: MR1427803 (98b:60036) Báez-Duarte, Luis Hardy-Ramanujan's asymptotic formula for partitions and the central limit theorem. Adv. Math. 125 (1997), no. 1, 114--120
It's online, but I can't post more than one link... :-(
Finally, I recommend visiting the home-pages of Kevin Ford and Gerald Tenenbaum...
A: The one I learned from is Tenenbaum. 
My personal favorite application is to derive heuristics for the twin prime conjecture (and more general Hardy-Littlewood conjecture). For an excellent exposition on this, see Soundararajan's article.
A: Have you read The Probabilistic Method by Joel Spencer and Noga Alon?
Although originally developed by Erdős, here's an example of the probabilistic method taken from combinatoricist Po-Shen Loh (Probabilistic methods in combinatorics):
$A_1, \dotsc, A_s \subseteq \{ 1, 2, \dotsc, M \}$ such that $A_i \not \subset A_j$ and let $a_i = \lvert A_i\rvert$.  Show that $$ \sum_{i=1}^s \frac{1}{\binom{M}{a_i}} \leq 1.$$
The hint is to consider a random permutation $\sigma = (\sigma_1, \dotsc, \sigma_M)$.  Loh defines the event $E_i$ when $\{ \sigma_1, \dotsc, \sigma_{a_i}\} = A_i$.  Then he observes the events $E_i$ are mutually exclusive and that $\mathbb{P}(E_i)$ is relevant to our problem….
There are probably a lot of olympiad combinatorics problems that can be solved this way.  Err… you were asking for number theory, but you will find both in Spencer and Alon's book.
A: This may not be the kind of thing you have in mind, but there are deep and not yet well-understood connections between analytic number theory and random matrix theory.  Try these 2004 summer school proceedings edited by Mezzadri and Snaith for an extremely thorough introduction.
A: Elliott's "Probabilistic number theory" ! It's not an easy read, but it's worth reading.
(Probability in number theory was applied most intensely to study the distribution of values of additive (and multiplicative!) functions)
A: Here are three:

*

*Analytic and probabilistic methods in number theory: proceedings of the ...
By Fritz Schweiger, E. Manstavičius
(This is a bit specialized but good.)


*Probabilistic Number Theory by Wouter Duivesteijn (Wayback Machine)


*PROBABILISTIC IDEAS AND METHODS IN ANALYTIC
NUMBER THEORY (This is from our most reputed MO-ist Pete L. Clark)
A: I recently noticed a connection, while looking at a campy sort of problem.
The problem goes like this 
A strange sort of prison has 1200 cells and 1200 guards (each numbered 1-1200). Whenever a guard turns his key in a lock it either locks the cell or unlocks the cell. Every night guard 1 goes through and turns his key in each cell, locking all of them. Then guard 2 turns his key in each cell that is divisible by 2 (which unlocks each of these) and so on until all the guards have gone through their round. So the question is at the end of the night how many cells are locked, which cells are they. 
So you can figure out pretty easily that if a cell has an even number of divisors then it will be unlocked at the end of the night. Whereas if the cell has an odd number of divisors then it will end up locked. You can use the tau function to think about when a number will have an even number of divisors and when it will have an odd number of divisors. (I won't ruin the solution for anyone) While I was working on this I noticed that the probability of an integer having an odd number of divisors decreases by a factor of 1/2 whenever a new prime factor is added to the prime factorization of the integer. In other words to compute the probability that an integer has an odd number of divisors you can raise 1/2 to the number of distinct primes in the prime factorization. 
Once you figure out which cells are locked at the end of the night this conclusion will probably seem pretty worthless but it got me interested in the connection between number theory and probability
A: I learned from Gian-Carlo Rota (Combinatorial snapshots) the following probabilistic motivation for looking at the Riemann zeta function: "subject to technical assumptions," the only probability measures on $\mathbb{N}$ for which the events of being divisible by distinct primes are independent are the ones which assign to a positive integer $n$ the probability $\frac{1}{n^s \zeta(s)}$ for some $s$.
A: The AMS Notices are now freely available online. Nice summary article by Brian Conrey on the Riemann Hypothesis, including the recent links with random matrices mentioned. His own work is not a reference in the survey article, but Conrey is the one who showed that at least forty percent of the zeros in the critical strip lie on the line with real part 1/2. See
http://www.ams.org/notices/200303/index.html
A: David Williams' Probability with Martingales has a few examples:

*

*A simple way to obtain $\prod_{k=1}^{\infty}\frac{1}{1-p_k^{-s}}=\sum_{n=1}^{\infty}\frac{1}{n^s}$


*How to prove that events A_p are independent, p is prime?


*Probability of highest common factor in Williams
A: The book by G. Tennenbaum, "Introduction a la theorie analytique et probabiliste des nombres" is well written. It has a translation in english called "Introduction To Analytic And Probabilistic Number Theory", Cambridge University Press (2004).
A: Tenenbaum's book is indeed one of the best on the subject; it's well-motivated and quite accessible. If you go a bit further back, there are also the Probabilistic Number Theory books by P. D. T. A. Elliot; volume I is on Mean Value Theorems, while volume II is on Central Limit Theorems. These are both a bit more specialised and slightly outdated. Even older still is Probabilistic Methods In the Theory of Numbers by J. Kubilius.
