Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Prompted by today's Minute Math question on the MAA site (,problems/T-problems/T-web,ia/2005web/tb05-12-ia.shtml), I started thinking about the probability that the sum of the numbers rolled on a set of $n$ dice is prime, particularly the asymptotics as $n\rightarrow\infty$. Heuristics strongly suggest that this is proportional to $1/\mathrm{ln}\ n$, and in fact, that it's $1/\mathrm{ln}\ n - O(1/\mathrm{ln}^2n)$, but I'm wondering how I would go about getting better asymptotics on the second term.

For the record, the heuristic argument goes something like this: assume for concreteness' sake that we're rolling 6-sided dice. Then the sum of the dice is closely approximated by a normal variable with mean $\mu=7n/2$ and variance $\sigma^2=35n/12$, and since the PNT says that the 'probability' of an integer $n$ being prime is roughly $1/\mathrm{ln}\ n$, we should be able to integrate that probability with respect to the normal distribution: $$p = {1\over \sqrt{2\pi\sigma^2}}\int_n^{6n} e^{-\left({(t-\mu)^2\over 2\sigma^2}\right)} {1\over\mathrm{ln}\ t} dt$$ And since $1/\mathrm{ln}\ t$ is monotonic, the value of the integral is bounded by the values we get by replacing its term in the integral with its maximum and minimum values on the integration interval: $${1\over\mathrm{ln}\ 6n} {1\over \sqrt{2\pi\sigma^2}}\int_n^{6n} e^{-\left({(t-\mu)^2\over 2\sigma^2}\right)} dt < p < {1\over\mathrm{ln}\ n} {1\over \sqrt{2\pi\sigma^2}}\int_n^{6n} e^{-\left({(t-\mu)^2\over 2\sigma^2}\right)} dt$$ Both of the integrals in the latter formula are essentially 1 (by definition), so we get ${1\over\mathrm{ln}\ 6n} < p < {1\over\mathrm{ln}\ n}$; replacing $\mathrm{ln}\ 6n$ by $(\mathrm{ln}\ 6 + \mathrm{ln}\ n)$ and using the binomial formula gives the heuristic approximation I alluded to above. This leads me to a couple of questions:

  1. How safe is the heuristic argument above? I know that the PNT gives good bounds on the number of primes in an interval (on the order of $n^{1/2}$ here, which in particular means that the error from the prime-counting would be $O(n^{-1/2})$ and so much smaller than the inverse-log terms above), but my analytic number theory isn't good enough to know whether 'weighting' by the normal distribution would throw off the classical proofs.
  2. How would I go about evaluating the integral above? Obviously the bounds I use bring it in to a fairly small range, but it seems as though to get a second term in my asymptotics I'd need to be able to at least approximate the integral, and there aren't any obvious tricks that look like they'd handle it well...
share|cite|improve this question
You have noted this in your comment to an answer, but you should be aiming for probabilities near the centre of the distribution so $1/\ln(7n/2) = \dfrac{1}{\ln(n)+\ln(3.5)}$ – Henry Mar 8 '12 at 11:12
up vote 4 down vote accepted

For (1.), Rosser and Schoenfeld (sp?) non-asymptotic estimates bound $\pi(n)$ between functions of the form $x/(\log x + C)$ and this should be enough.

For (2) your integrals are rapid decaying and incredibly close to the integrals on the whole real line. O($n$) standard deviations from the average is quite an unlikely event.

share|cite|improve this answer
(1) makes a lot of sense; that certainly means that the argument about the order of magnitude goes through cleanly. On (2), though, keep in mind that the integral diverges at t=1, and I'm not sure that integrating on the whole line would help any; if anything I'd expect to have to go the other direction and chop off more of the tails to get something that makes the asymptotics clear... – Steven Stadnicki Sep 21 '10 at 23:24
Where you wrote "calculate the integral above" I thought you meant getting accurate asymptotics of the Gaussian integrals that bound it. I think the same principle works for the quantity being bounded: the integral (with 1/ln(t)) is concentrated in an interval of width shorter than O(N^(0.5 + epsilon)), where the epsilon comes from whatever procedure is used to demarcate that interval of integration, and log(t) varies little on this range. In the tails, everything is suppressed by rapid decay of the Gaussian. – T.. Sep 21 '10 at 23:45
Ahhh, spot on - I hadn't tried the bounding technique, but you're right, this puts it between 1/ln(7n/2-n^1/2ish)*(1-O(n^-k)) and 1/ln(7n/2+n^1/2ish)*(1+O(n^-k)) (for arbitrary k I think as the tails are exponential, but certainly for some k)! and these come out to 1/ln(7n/2) plus some O(n^-1/2ish) factors. Thank you! – Steven Stadnicki Sep 22 '10 at 17:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.