Number

Factoring uniquely with no way to divide

Unique factorisation is proved by dividing with a small remainder, and in the Gaussian integers that works because discs of radius one cover the plane. In the integers of ℚ(√−19) the discs leave holes, no division algorithm of any kind can be made to work — and factorisation is unique anyway. The same field is why n² + n + 41 is prime forty times running.

Worth reading first: A factorisation that hides its primes · Two squares, and a lattice.

The standard proof of unique factorisation runs through a chain of four links. A division algorithm gives Euclid’s algorithm; Euclid’s algorithm gives a greatest common divisor as a combination of the two numbers; that combination gives Euclid’s lemma; and the lemma gives uniqueness. In the whole numbers every link is ordinary. In the numbers of the form 4k+14k + 1 the chain was cut at the first link — no subtraction, no algorithm — and uniqueness failed.

That invites the obvious conclusion: a division algorithm is what unique factorisation needs. The conclusion is false, and the counterexample is a ring where division fails so thoroughly that no measure of size, however it is chosen, can repair it — and where every element nevertheless factors in exactly one way.

The ring lives among the imaginary quadratic fields, and the place to start is how division looks there.

Where discs of radius one cover the lattice, and where they leave holes. Six lattices of algebraic integers drawn as points in the plane with a unit disc around each; for five of them the discs cover the whole plane and for the sixth, the integers of the field of the square root of minus nineteen, uncovered holes remain.
Fig. 1 The integers of six fields Q(d)\mathbb{Q}(\sqrt{-d}) as lattices in the plane, each point with a disc of radius 11 around it. For d=1,2,3,7d = 1, 2, 3, 7 and 1111 the discs cover the plane completely; for d=19d = 19 thin bands between the rows are left uncovered. Beneath each panel is the distance from the farthest point of the plane to the nearest lattice point, which the generator finds by sampling a cell and checks against the exact formula.

Division is a question about discs

The integers of Q(d)\mathbb{Q}(\sqrt{-d}) form a lattice in the complex plane. For d=1d = 1 it is the square grid of Gaussian integers a+bia + bi; for d=2d = 2 it is the rectangle grid a+b2a + b\sqrt{-2}; and when dd leaves remainder three on division by four, the integers include the half-points ω=(1+d)/2\omega = (1 + \sqrt{-d})/2, and the lattice is made of triangles — the extra points that the integers of a field turned out to need. Size is measured by the norm, the squared distance from the origin, and it is multiplicative.

To divide α\alpha by β\beta with a small remainder, compute the exact quotient α/β\alpha / \beta, which is some point of the plane, not usually on the lattice. Pick a lattice point qq near it and set r=αqβr = \alpha - q\beta. Then

N(r)=N(β)αβq2,N(r) = N(\beta) \cdot \left|\frac{\alpha}{\beta} - q\right|^2,

so the remainder is smaller than the divisor exactly when the exact quotient lies within distance one of the chosen lattice point. The division algorithm works for every pair exactly when discs of radius one around the lattice points cover the whole plane. Division with remainder, the thing Euclid’s algorithm is built from, has become a covering problem.

The covering problem has an exact answer. For dd leaving remainder one or two on division by four, the lattice is rectangular with sides 11 and d\sqrt d, the worst point is the centre of a cell, and its distance to the corners is 1+d/2\sqrt{1 + d}/2. That is below one only for d=1d = 1 and d=2d = 2. For dd leaving remainder three the cell is a triangle, the worst point is its circumcentre, and the distance is (d+1)/(4d)(d + 1)/(4\sqrt d) — below one for d=3d = 3, 77 and 1111, where it is 0.580.58, 0.760.76 and 0.900.90, and above one from d=15d = 15 on. Those five values, 1,2,3,7,111, 2, 3, 7, 11, are the norm-Euclidean imaginary quadratic fields, and there are no others.

Euclid’s algorithm where the discs cover

Where the discs cover, the algorithm runs, and it runs faster than the covering bound promises. In the Gaussian integers the worst point is the centre of a unit square, at distance 2/2\sqrt2/2, so every remainder has at most half the norm of its divisor.

Euclid's algorithm in the Gaussian integers, from 2 + 23i and 20 + 9i. A table of the steps of Euclid's algorithm on two Gaussian integers, each row showing the dividend, divisor, rounded quotient, remainder, and the remainder's norm falling at each step.
Fig. 2 Euclid’s algorithm on 2+23i2 + 23i and 20+9i20 + 9i in the Gaussian integers. Each row divides, rounds the exact quotient to the nearest lattice point and keeps the remainder; the remainders’ norms fall 117117, 1313, 00. The last non-zero remainder, 23i2 - 3i, is a greatest common divisor. The generator checks that every remainder’s norm is at most half the divisor’s.

The two starting numbers have norms 533=13×41533 = 13 \times 41 and 481=13×37481 = 13 \times 37, which share a factor of thirteen, so a common divisor of norm 1313 is expected. The algorithm finds it in two divisions: 23i2 - 3i, which is 3+2i3 + 2i multiplied by the unit i-i. Running the steps backwards expresses it as a combination of the two starting numbers, exactly as in the algorithm on rectangles, and from there Euclid’s lemma follows word for word.

This is the whole reason the Gaussian integers factor uniquely, and it is why primes of the form 4k+14k + 1 split as a product of two conjugates in only one way. It is also why the two squares can actually be computed: an algorithm that proves uniqueness also produces the thing whose uniqueness it proves.

Where the discs leave holes

The covering fails for most fields, and it fails the same way whether factorisation is unique or not.

Where discs of radius one cover the lattice, and where they leave holes. Six lattices of algebraic integers drawn as points in the plane with a unit disc around each; for five of them the discs cover the whole plane and for the sixth, the integers of the field of the square root of minus nineteen, uncovered holes remain.
Fig. 3 Four more lattices with their unit discs. The integers of Q(5)\mathbb{Q}(\sqrt{-5}) and Q(6)\mathbb{Q}(\sqrt{-6}) do not factor uniquely; those of Q(19)\mathbb{Q}(\sqrt{-19}) and Q(43)\mathbb{Q}(\sqrt{-43}) do. All four leave holes, and the farthest distances — 1.221.22, 1.321.32, 1.151.15 and 1.681.68 — do not sort the two kinds apart.

The field of 5\sqrt{-5} is the one where six factors twice, and its lattice is a rectangle too tall for the discs, with holes in the middle of every cell. That looks like an explanation of the failure, and the rectangle is often offered as one. But the lattice of Q(19)\mathbb{Q}(\sqrt{-19}) also leaves holes, of about the same size, and in that ring factorisation is unique. So is it in Q(43)\mathbb{Q}(\sqrt{-43}), whose holes are the largest in the figure.

The picture therefore says less than it seems to. Covering implies a division algorithm, and a division algorithm implies unique factorisation. Holes deny the first implication a starting point and say nothing about the conclusion. Nothing in the geometry of discs distinguishes a field whose factorisation merely has no easy proof from one whose factorisation is actually broken.

One division that cannot be done

The holes can be made concrete. In the integers of Q(19)\mathbb{Q}(\sqrt{-19}), with ω=(1+19)/2\omega = (1 + \sqrt{-19})/2, try to divide ω\omega by 22.

A division that cannot be done in the integers of ℚ(√−19). A patch of the lattice of integers of the field of the square root of minus nineteen, with unit discs around the lattice points and the quotient omega over two marked outside all of them.
Fig. 4 The exact quotient ω/2\omega / 2, in orange, and the four nearest integers of the field — 00, 11, ω\omega and 1+ω-1 + \omega — with their unit discs. All four are 5/41.12\sqrt{5/4} \approx 1.12 away, so the quotient sits just outside every disc. The generator searches the surrounding lattice for anything nearer and finds nothing.

The quotient lies at the centre of a rhombus of four lattice points, all equidistant from it, and all slightly more than one away. Whatever quotient is chosen, the remainder ω2q\omega - 2q has norm 4×54=54 \times \tfrac54 = 5, and the divisor 22 has norm 44. The remainder is larger than the divisor. The norm cannot drive this division.

The failure is not exotic. Holes of this kind sit between every pair of rows in the lattice, and a positive fraction of all divisions land in them. What makes this one useful is that it is small enough to check by hand.

No measure of size will do

The norm is only one way to measure size, and a Euclidean ring needs only some function to the whole numbers that its remainders decrease. Perhaps a cleverer function would work where the norm fails. In 1949 Theodore Motzkin showed that none does, and his argument turns on a property any such function would force.

Suppose some size function makes the ring Euclidean. Among the elements that are neither zero nor units, take one of smallest size and call it uu. Divide anything at all by uu. The remainder is either zero or smaller than uu — and everything smaller than uu is zero or a unit, since uu was the smallest of the rest. So every element of the ring leaves remainder zero or a unit on division by uu. The only units in this ring are 11 and 1-1, so there are at most three remainders, and the number of remainder classes modulo uu is exactly its norm. So uu would have norm 22 or 33.

The norms in the integers of ℚ(√−19) never take the values 2 or 3. A grid of the norms x squared plus x y plus five y squared for small whole x and y, with the values up to five highlighted; one, four and five appear and two and three never do.
Fig. 5 The norm x2+xy+5y2x^2 + xy + 5y^2 of every element x+yωx + y\omega with x6|x| \le 6 and y3|y| \le 3; the small values 11, 44 and 55 are shaded. Neither 22 nor 33 appears anywhere. The generator checks a much larger window and confirms that the smallest norms are 11, 44 and 55.

No element has norm 22 or 33. The reason is the identity 4(x2+xy+5y2)=(2x+y)2+19y24(x^2 + xy + 5y^2) = (2x + y)^2 + 19y^2: for the norm to be below 55, yy must be 00, and then the norm is a square. So there is no candidate for uu, and no size function whatever makes this ring Euclidean — not the norm, not any modification of it, not any function anyone could define.

A division allowed a second attempt

Division fails in this ring, but it fails in a curiously repairable way. The failed division above was ω\omega by 22. Multiply ω\omega by 1ω1 - \omega first. Since ω\omega satisfies ω2=ω5\omega^2 = \omega - 5, the product is ωω2=5\omega - \omega^2 = 5, and 55 divides by 22 with remainder 11. So the combination (1ω)ω2×2=1(1 - \omega)\,\omega - 2 \times 2 = 1 is non-zero and has norm 11, smaller than the norm 44 of the divisor.

That is not a division algorithm, since a multiple of ω\omega has been divided rather than ω\omega itself. But it is exactly what the proof of unique factorisation needs. Euclid’s lemma comes from a greatest common divisor written as a combination of the two numbers, and a combination with a multiplier in front is still a combination. The Dedekind–Hasse criterion turns this into a theorem: a ring factors uniquely, with every ideal principal, exactly when for any α\alpha and β\beta with β\beta not dividing α\alpha some combination sαtβs\alpha - t\beta is non-zero and of smaller norm than β\beta.

The criterion asks less than a division algorithm in one precise respect. A division algorithm insists on s=1s = 1: the dividend must be taken as it is. Dedekind–Hasse lets the dividend be multiplied by anything in the ring before dividing, which moves the exact quotient sα/βs\alpha/\beta around the plane until it lands inside a disc. In the covering picture, a hole is no longer fatal; it is only a place from which the quotient has to be moved.

In Q(19)\mathbb{Q}(\sqrt{-19}) it can always be moved. Every quotient that falls in a hole can be shifted by a multiplier such as 22, ω\omega or 1ω1 - \omega into some disc, and checking that this always succeeds is a finite calculation over one cell of the lattice, because the holes repeat with the lattice. The same calculation for Q(5)\mathbb{Q}(\sqrt{-5}) fails on the centre of its rectangle, which is where the missing divisor of six would have been.

Why it factors uniquely anyway

Unique factorisation in a ring of algebraic integers is the statement that every ideal is principal — generated by a single element — which is the class number being one. Euclid’s algorithm is one way to prove that, and there is another which never divides anything.

Minkowski’s theorem on lattice points in convex regions shows that every class of ideals contains an ideal whose norm is at most 2πD\tfrac{2}{\pi}\sqrt{|D|}, where DD is the discriminant. For D=19D = -19 the bound is 2.772.77. So every class contains an ideal of norm 11 or 22. An ideal of norm 11 is the whole ring, which is principal. An ideal of norm 22 would be a prime ideal lying over 22, and that exists only if x2+x+5x^2 + x + 5 has a root modulo 22 — but x2+x+5x^2 + x + 5 is odd for every whole xx. So there is no such ideal, every ideal is principal, and factorisation is unique.

The proof replaces a covering of the whole plane with a bound on where one ideal in each class must sit. The first needs every point of the plane within reach of the lattice; the second needs only that a region of a certain area contain a lattice point, and it asks that of the ideals rather than of the ring. That is a much weaker demand, which is why it survives when the discs leave holes.

Four fields pass the second test and fail the first: d=19,43,67d = 19, 43, 67 and 163163. Together with the five that pass both, they make the nine imaginary quadratic fields with unique factorisation, a list Gauss conjectured and that was proved complete in the 1950s and 1960s. So of the nine, five factor uniquely because they can divide and four factor uniquely for a subtler reason, and which primes a form takes is decided by exactly this distinction when it can be decided by a congruence at all.

Forty primes in a row

The largest of the four has a visible consequence, and it was noticed long before its cause.

Euler's n² + n + 41: forty primes in a row. A grid of the values of n squared plus n plus forty-one for n from zero to forty, all prime but the last, which is forty-one squared.
Fig. 6 The values of n2+n+41n^2 + n + 41 for n=0n = 0 to 4040. The first forty are all prime; the forty-first, at n=40n = 40, is 1,681=41×411{,}681 = 41 \times 41. The generator tests each value for primality.

Euler noticed in 1772 that n2+n+41n^2 + n + 41 is prime for every nn from 00 to 3939, and the spiral of primes shows it as a dark diagonal. The failure at n=40n = 40 is forced by the polynomial’s own form: 402+40+41=40×41+41=41240^2 + 40 + 41 = 40 \times 41 + 41 = 41^2. So forty is the longest run this polynomial could possibly have. The question is why it has the longest possible run instead of failing at n=2n = 2 like most quadratics.

The discriminant of x2+x+41x^2 + x + 41 is 1164=1631 - 164 = -163, and the norm on the integers of Q(163)\mathbb{Q}(\sqrt{-163}) is x2+xy+41y2x^2 + xy + 41y^2. Suppose some value n2+n+41n^2 + n + 41 with n39n \le 39 had a prime factor qq. The value is below 41241^2, so q<41q < 41. Since qq divides n2+n+41n^2 + n + 41, the polynomial has a root modulo qq, so qq splits in the field, into prime ideals of norm qq. With unique factorisation those ideals are principal, so some element has norm exactly qq. But x2+xy+41y2=(x+y/2)2+1634y2x^2 + xy + 41y^2 = (x + y/2)^2 + \tfrac{163}{4}y^2, which is at least 40.7540.75 unless y=0y = 0 — and then it is a square, not a prime. So no element has norm qq, and the value must have been prime.

Which n² + n + p stay prime as long as possible. A table of primes p up to forty-seven with the length of the run of prime values of n squared plus n plus p from n equals zero, and whether four p minus one is a discriminant with unique factorisation.
Fig. 7 For each prime pp up to 4747, how many values of n2+n+pn^2 + n + p from n=0n = 0 are prime before the first composite. The longest possible run is p1p - 1, and it occurs only for p=2,3,5,11,17p = 2, 3, 5, 11, 17 and 4141, the primes with 4p14p - 1 among 7,11,19,43,67,1637, 11, 19, 43, 67, 163. The generator checks every prime below 400400 and finds no other.

The argument works for any pp whose field has class number one, and it reverses: if every value n2+n+pn^2 + n + p with np2n \le p - 2 is prime, the field of discriminant 14p1 - 4p factors uniquely. That equivalence is Rabinowitsch’s criterion, published in 1913. So Euler’s polynomial is the last of six. The table finds exactly those six, with runs of 1,2,4,10,161, 2, 4, 10, 16 and 4040, and no seventh prime below four hundred comes close. The completeness of the nine-field list says there is no seventh at all.

The smaller members of the family show the mechanism with less at stake. For p=17p = 17 the field has discriminant 67-67, the norm form is x2+xy+17y2x^2 + xy + 17y^2, and its smallest value with y0y \ne 0 is 16.7516.75 — just above every prime below seventeen, which is what lets n2+n+17n^2 + n + 17 run through sixteen primes. For p=13p = 13 the discriminant is 51-51, the field does not factor uniquely, and the run stops at the first step: 12+1+13=151^2 + 1 + 13 = 15. The prime 33 divides it and also divides the discriminant, so in that field 33 is the square of a prime ideal of norm 33 — and since x2+xy+13y2x^2 + xy + 13y^2 never equals 33, that ideal is not principal, and nothing stops a value from being a multiple of three. The length of the run is a report on whether the small primes’ ideals are principal, read off one value at a time.

What the discs cannot decide

Whether a ring factors uniquely. The covering figures decide exactly whether the norm gives a division algorithm, and they decide it completely. Unique factorisation is a different question, and the second covering figure shows two rings that fail to factor and two that succeed, with holes of comparable size in all four.

That no other function would work. The norm table shows that nothing has norm 22 or 33 over a finite window, and the identity with 19y219y^2 extends it to the whole ring. The step from there to every conceivable size function is Motzkin’s argument, which is a proof about all functions at once and cannot be drawn.

The completeness of the list. The Rabinowitsch table checks primes below four hundred. That no larger prime has the full run is the theorem that there are exactly nine fields, proved by Kurt Heegner in 1952 in a paper that was not accepted for more than a decade, and again by Alan Baker and Harold Stark in the late 1960s. A finite search cannot establish it, and before those proofs the possibility of a tenth field was genuinely open.

Still open: which class groups occur

The class number counts ideal classes, and the classes themselves form a finite abelian group, the class group. For the nine fields it is trivial. For Q(5)\mathbb{Q}(\sqrt{-5}) it has two elements, which is the one missing divisor that made six factor twice.

Every finite abelian group is known to be the class group of some ring that behaves like a ring of integers — Luther Claborn proved that in 1966 for the broad class of Dedekind domains. Whether every finite abelian group is the class group of the integers of some number field is not known. No group has been ruled out, and no construction reaches them all. Even for imaginary quadratic fields, where the class groups are computed by the thousand, which groups appear is known only in pieces.

A theorem proved two ways

Unique factorisation has two proofs in the imaginary quadratic fields, and they reach different distances. Division with remainder is local and constructive: it needs every point of the plane near the lattice, it produces greatest common divisors by an algorithm, and it works in exactly five fields. The ideal-theoretic proof is global and silent: it needs only that each ideal class have a small representative, it computes nothing, and it works in nine.

The four fields between them are where the chain of implications from the start of this essay is broken at its first link and the conclusion holds anyway. They are why “Euclidean” and “unique factorisation” are different words, and the largest of them is why a quadratic Euler wrote down in 1772 produces forty primes before it stops.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

Algebraic integerCoveringDiscriminantEuclidean algorithmGaussian integersLatticeNormUnique factorisation