The same bell on thinner sets
Worth reading first: How many primes a typical number has · Two squares, and a lattice.
How many primes a typical number has set out the Erdős–Kac theorem. Count the distinct primes dividing a number and call the count . For a typical near , is about , and across all the numbers up to it is spread in a bell curve whose variance is also . The model behind the theorem is that each prime divides a random number with probability , independently of the others, so that is a sum of many small independent coin tosses — a bell curve assembled out of coin flips, with the coins weighted by .
That essay ended by naming the sets the model has no obvious claim on: the numbers one less than a prime, , and the values . Both are thin. Among the numbers near twenty million about one in sixteen is one less than a prime, and the squares plus one are thinner still — only two thousand of them below four million. More to the point, neither set is random with respect to small primes. Every is even. No is divisible by 3. The coin tosses that make the bell are not fair coins for these sets, and it is not obvious that they are coins at all.
The bell is there on all three. Heini Halberstam proved in 1956 that it must be: the Erdős–Kac theorem holds for the shifted primes and for the values of any irreducible polynomial, among them, with the same leading for the mean and the variance. What the figures add is the size of the differences between the three sets, which the theorem’s leading term does not see, and an account of where each difference comes from.
Counting the prime factors of the squares plus one exactly
The count for whole numbers is easy: add one to every multiple of every prime up to twenty million, and the total at each is . The count for is read from the same table. The numbers need more care, because they reach four million million and no table goes that far.
The method uses a fact from two squares and a lattice. An odd prime divides some exactly when is a square modulo , which happens exactly when leaves remainder 1 on division by 4 — the same primes that are sums of two squares. For each such up to two million there are two residues with , found by raising any non-residue to the power , and divides exactly when . So for each prime the multiples are two arithmetic progressions, and stepping through them marks every the prime divides. The two squares actually produced used the same square root of to construct the two squares themselves.
After every prime up to two million has been divided out of , what remains is either 1 or a single prime. It cannot be a product of two primes above two million, since that product would exceed . So is the number of small primes marked plus one if anything is left, exactly, for all two million values.
How Halberstam’s argument goes
The proof for whole numbers that how many primes a typical number has described works by moments. Write as a sum, over the primes up to some bound, of the indicator that divides the number. The -th moment of that sum expands into counts of numbers divisible by a product of chosen primes, and for whole numbers the count of multiples of up to is with an error of at most 1. The indicators therefore behave, moment by moment, exactly like independent coins with probabilities , and a sum of independent coins whose variance grows without bound has moments approaching the bell’s.
Halberstam’s insight was that the same expansion works for any set in which the members divisible by a product of distinct primes can be counted with a small error, and that the probabilities then multiply. For the number of for which divides is plus an error bounded by the number of residues, by the Chinese remainder theorem. For the count of primes with modulo is the number of primes in an arithmetic progression, and its error term is the delicate part: it needs the primes to be spread evenly over residue classes for many moduli at once, on average, which is a theorem of the Bombieri–Vinogradov kind. In both cases the coins are unfair but still independent, in the sense the moments need, and that is enough.
Which primes divide which numbers
The three sets differ first in how often each small prime divides their members.
For whole numbers, a prime divides one number in . For the numbers , divides exactly when leaves remainder 1 on division by ; primes larger than are spread evenly over the non-zero remainders, by Dirichlet’s theorem in its quantitative form, so the share is — slightly more than , and for it is all of them. For , the share is the number of solutions of modulo , divided by : two solutions when , none when , one when .
The squares plus one are therefore lopsided in a way the other sets are not. Half the primes never divide them at all, and the other half divide them twice as often as they divide a random number. Adding up the probabilities, over the primes up to grows like exactly as does, because the primes are split evenly between the two remainders modulo 4 — that is the content of Dirichlet’s theorem again, applied to the modulus 4. The losses and the gains cancel in the leading term. What survives is a constant.
The cancellation can be stated exactly. Dirichlet’s theorem in Mertens’s form says that the reciprocals of the primes up to add to plus a constant, and so do the reciprocals of the primes . The squares plus one take twice the first sum and none of the second, , which is again. Had the primes favoured one remainder over the other, even slightly in the limit, the leading term itself would change; that they do not is the theorem that makes the bell’s location the same for all three sets. The numbers need nothing so delicate: each probability exceeds by about , and those excesses form a convergent series from the start.
Three averages and three constants
The mean of over each set is the sum of those probabilities, and each sum is of the size plus a constant.
For whole numbers the constant is Franz Mertens’s, , from the asymptotic . For every prime contributes extra, and these extras add to , so the constant is — a typical has one more prime factor than a typical number of the same size, most of it the 2 that every carries. For the extras are , positive for half the primes and negative for the other half, and they add to ; the constant is , and a typical square plus one has slightly fewer prime factors than a typical number its size.
The averages approach their lines from below, and slowly. At twenty million the whole numbers sit 0.027 below Mertens’s constant and the are 0.113 below theirs; the squares plus one, followed out to four million million, are 0.013 below. The gaps are of the order of one over the logarithm of the size, the next term in Mertens’s theorem, and they shrink as the figure moves right. The constants were computed independently of the averages, by summing the probabilities of the previous figure over the primes up to twenty million, and the averages head for them.
The variances, far behind
The variance does not cooperate so readily.
The theorem says the variance is of the size plus lower-order terms, and the lower-order terms are large. At twenty million the variance for whole numbers is 1.14 against a of 2.82, as the previous essay found; for it is 0.94; for at four million million it is 1.34 against 3.37. The variance has lower-order terms of its own, and for all three sets they are negative and comparable to the leading term at every size a computation can reach. The ordering of the three is itself informative. The numbers have the largest mean and the smallest variance, and the reason is the prime 2: it divides every one of them, so it adds one to the count and nothing to the spread. The prime 3 divides exactly half of them, the fairest coin possible, and the larger primes divide them a little more often than they divide random numbers. A coin that always lands the same way contributes no variance, and has one such coin and several nearly fair ones in place of the whole numbers’ lopsided small primes. The bells in the hero figure are standardised by each set’s actual spread, not by ; standardised by the theorem’s spread they would be far too narrow.
That is the slow convergence how fast the bell arrives measured for sums of independent terms, made worse here because the number of effective terms is , which is about three for every size that has ever been computed. The theorem is about a limit in which is large, and reaches 5 only when has about 65 digits.
How many have exactly k
The constant shifts show up as shifts of the whole distribution.
Whole numbers between ten and twenty million most often have three distinct prime factors. The numbers in the same range most often have four — every one of them is even, and the 2 is one factor for free. The squares plus one, though a hundred thousand times larger, most often have three: the primes 3, 7, 11, 19, … that never divide them hold the count down, and although their is about half a unit larger than the whole numbers’, their negative constant spends a third of a unit of it, and their mean is only about a quarter higher. The case for is empty except at and and the other primes one more than a power of two: is even, so means is a power of 2, and is a Fermat prime.
One prime factor, and an open problem
The case for the squares plus one is famous. It is the question whether is prime.
Godfrey Hardy and John Littlewood conjectured in 1923 that the number of with prime is about , where is a product over primes of exactly the probabilities in the second figure, , which comes out at . The count up to two million is 102,205; the prediction is 102,302. The ratio has settled within a few per cent of 1 from on. The prediction is built from the same arithmetic as the averages: the chance that escapes every small prime, corrected prime by prime for how often each one divides it. The constant is larger than 1 because half the primes can never divide a square plus one, so a square plus one is about 1.37 times likelier to be prime than a random whole number of the same size — half of them are even, but so are half of all numbers, and the prime 2 neither helps nor hurts; the primes that divide it twice as often pull the other way, and the product of all the corrections settles at 1.3728. It is the same lopsidedness that moved the average count of prime factors down, seen at the other end of the distribution.
Whether there are infinitely many primes of the form is not known. Edmund Landau listed it in 1912 as one of four problems about primes that seemed unattackable, and it still is; which way a prime’s two squares point met it as the case of a question about primes . The contrast with the bell curve is the point of the figure. That the number of prime factors of follows a bell curve with mean and variance is a theorem; that the number is 1 infinitely often is a conjecture with no proof in sight. Halberstam’s theorem is about typical behaviour and needs only that most values have about the expected count, which a sieve can show. Landau’s problem is about a rare event, values with the fewest possible factors, and the sieve that cannot finish explained why sieves cannot by themselves detect primes in a thin sequence: they cannot tell numbers with one prime factor from numbers with two, a limitation two halves a sieve cannot tell apart made precise.
Still open: the sets a sieve cannot reach
Halberstam’s method handles any set in which the members divisible by each small prime can be counted with a good error term, and and polynomial values both qualify. For other natural sets it is not known whether the bell holds. For sets that grow exponentially or faster, such as the numbers , a sieve has nothing to work with: the members up to number about , far too few for the averaging every method here depends on, and very little is known about how their prime factors are distributed. And for all the sets in this essay, the joint behaviour of at neighbouring members — whether the counts for and are independent, as for whole numbers they are in the limit — depends on correlations between primes in polynomial sequences, the question the patterns primes are allowed to make showed is decided by remainders when it is decided at all.
A model that survives being made unfair
The Erdős–Kac theorem looked like a statement about randomness — fair coins, one per prime. On the numbers one less than a prime and on the squares plus one the coins are not fair: one prime divides every member, half the primes divide none, the other half divide twice as often. The bell survives all of it, because the leading term depends only on the total probability, , and that total grows like for every set whose primes are spread evenly over remainders. What the unfairness changes is a constant, computed in advance from the probabilities and found again in the averages: 0.2615, 1.035 and −0.073. The one question the model cannot answer is the one it answers worst — how often the count is exactly one.
What links here
Computed from the collection, not written here: the essays that point at this one.
Named objects
A dashed tag is an object no other essay names yet.
Mertens constantNormal distributionNormal orderPrime factorisationQuadratic residueSieve