Dynamics

Fair in base two and not in base six

Almost every number has digits that look like fair coin tosses in every base, and almost no number anyone can name is known to. Stoneham's number, 1/(3·2³) + 1/(9·2⁹) + 1/(27·2²⁷) + …, is one of the few: its binary digits are provably fair. Written in base 6 the same number has a run of 121 zeros starting at the 730th digit, and a longer one at every power of three after — because in base 6 each of its terms is a terminating fraction, and the gaps between them never fill.

Worth reading first: Fractions repeat and roots look random · Almost every orbit is fair.

Fractions repeat and roots look random ended on an embarrassment. A number is normal in a base if every block of digits occurs in its expansion with the frequency fairness demands — each digit a tenth of the time in base 10, each pair a hundredth, and so on for ever. Émile Borel proved in 1909 that almost every number is normal in every base at once. And yet for 2\sqrt 2, π\pi, ee, or any number anyone meets for a reason other than its digits, normality is unknown in every base — not even known is whether half the binary digits of 2\sqrt 2 are ones.

That essay asked for one specific number. The numbers known to be normal are mostly built for the purpose: David Champernowne’s 0.123456789101112…, written by listing the whole numbers, is normal in base 10 by construction and not by any accident. There is a small class of exceptions — numbers given by a formula with no reference to digits that have been proved normal in a base — and the oldest and simplest of them is Richard Stoneham’s:

α=∑k≥113k 23k=13⋅23+19⋅29+127⋅227+⋯\alpha = \sum_{k \ge 1} \frac{1}{3^k\, 2^{3^k}} = \frac{1}{3 \cdot 2^3} + \frac{1}{9 \cdot 2^9} + \frac{1}{27 \cdot 2^{27}} + \cdots

David Bailey and Richard Crandall proved in 2002 that α\alpha is normal in base 2. The surprise is what happens in base 6.

One number, fair in base 2 and gappy in base 6. α binary: 000010101011100011100011100011110110100001001011…; base 6: 013014043000333425113050213000000124355504543223…; zero runs after 3^k: 81:16, 243:42, 729:121.
Fig. 1 Stoneham’s number written out exactly in two bases: the first 1,320 binary digits, a stripe for each 1, and the first 880 base-6 digits, shaded by value, with the long runs of zeros marked.

Normal means an orbit spreads evenly

Normality is a statement about dynamics. The doubling map x↦2x mod 1x \mapsto 2x \bmod 1 shifts a number’s binary digits one place to the left and drops the one that falls off, so following xx’s orbit is reading its binary digits one at a time: the orbit lands in [0,12)[0, \tfrac12) exactly when the next digit is 0, in [14,12)[\tfrac14, \tfrac12) when the next two are 01, and so on. A number is normal in base 2 exactly when its orbit under doubling visits every interval in proportion to its length — the property an orbit’s histogram measures. In base 6 the map is x↦6x mod 1x \mapsto 6x \bmod 1.

Birkhoff’s ergodic theorem says that almost every orbit is fair, which is Borel’s theorem in dynamical language. It says nothing about any particular orbit, and that is the gap Stoneham’s number crosses. Its orbit under doubling is evenly spread; its orbit under multiplication by six is not. One number, two shifts, two opposite verdicts — and both are theorems.

The binary digits look fairer than fair

Binary blocks of Stoneham's number and of √2. Max relative block deviation, L=1..10: α 0.0011,0.0023,0.0027,0.0056,0.0091,0.0134,0.0192,0.0346,0.0500,0.0858; √2 0.0026,0.0074,0.0145,0.0188,0.0280,0.0413,0.0724,0.1089,0.1934,0.2600; coin 0.0037,0.0074,0.0129,0.0211,0.0333,0.0516,0.0788,0.1192,0.1787,0.2665.
Fig. 2 For each block length from 1 to 10, the largest departure of any block’s count from its fair share, over 200,000 binary digits and on a logarithmic scale, for Stoneham’s number, for 2\sqrt2, and for the typical run of fair coin tosses.

Computed exactly to two hundred thousand binary places — each term is one integer division, and the terms die out after 311=177,1473^{11} = 177{,}147 places — the digits of α\alpha pass every block test the figure applies. So do the digits of 2\sqrt 2, computed by an integer square root to the same depth, and 2\sqrt 2 looks, by this measure, exactly like a run of fair coin tosses: its worst block departure tracks the coin’s typical value at every block length.

Stoneham’s number does something stranger. Its worst departures are far smaller than a coin’s — 0.0011 for single digits against the coin’s 0.0037, 0.086 for blocks of ten against 0.27. Its digits are too even to be random. That is the fingerprint of how it is built: not from independent choices but from a few periodic patterns laid over one another, which spread more evenly over a finite stretch than chance does. Normality is a statement about the limit, and it is compatible with being suspiciously regular on the way.

Computing the digits exactly

None of these figures could be drawn in ordinary floating-point arithmetic. A double-precision number carries 53 binary digits, so the doubling map applied to it runs out of digits after 53 steps and lands on nought for ever; any orbit of more than a few dozen steps computed that way is an orbit of the rounding, not of the number.

Stoneham’s formula makes exact computation easy. To get the first NN binary digits, multiply α\alpha by 2N2^N: the kk-th term becomes 2N−3k/3k2^{N - 3^k}/3^k, whose whole-number part is a single division of a power of two by a power of three. Adding those parts for every kk with 3k≤N3^k \le N gives 2Nα2^N \alpha to within a few units in the last place, and the last 64 digits are thrown away to make the rest certain. In base 6 the computation is cleaner still: 6Mα6^M \alpha is a sum of whole numbers 33k−k⋅6M−3k3^{3^k - k} \cdot 6^{M - 3^k}, plus a tail smaller than one, so its base-6 digits are exactly the digits of α\alpha. For 2\sqrt 2 the binary digits come from the integer square root of 2⋅4N2 \cdot 4^N, found by Newton’s method in whole numbers. None of the three computations takes more than a fraction of a second, and none involves a single rounded number.

In base two every term repeats for ever

In base 2 every term repeats for ever. k=1: starts 3, period 2; k=2: starts 9, period 6; k=3: starts 27, period 18; k=4: starts 81, period 54; k=5: starts 243, period 162; k=6: starts 729, period 486; k=7: starts 2187, period 1458; k=8: starts 6561, period 4374; k=9: starts 19683, period 13122
Fig. 3 In base 2 the k-th term of α is the repeating binary expansion of 1/3^k, shifted to begin at place 3^k; each bar runs from where the term begins to the end of the digits computed, with a tick at every repetition of its period.

The binary expansion of 1/3k1/3^k is periodic, and its period is the number of times 2 must be multiplied by itself before it leaves remainder 1 on division by 3k3^k — the multiplicative order of 2 modulo 3k3^k, which is 2⋅3k−12 \cdot 3^{k-1}. So the kk-th term of α\alpha begins at binary place 3k3^k and from there on repeats a block of 2⋅3k−12 \cdot 3^{k-1} digits for ever. Every term overlaps every later one; the binary digits of α\alpha are the result of adding infinitely many periodic patterns, with carries.

That 2 has the largest possible order modulo every power of 3 — it is a primitive root — is the engine of Bailey and Crandall’s proof. Each term’s period is as long as it can be, so each periodic block runs through a complete set of residues, and the superposition, read through the doubling map, cannot favour any region of the interval. The argument is a careful estimate of how evenly the points 2nα2^n \alpha fall, built on exactly this structure, and it is one of very few routes known from a formula to a proof of normality.

Too even to be random, and still normal

The extra evenness in the second figure is worth a moment, because it says something about what normality is and is not. A sequence of genuinely random bits fluctuates: over two hundred thousand digits, some block of ten will turn up about a quarter more or less often than its fair share, simply by chance. Stoneham’s digits fluctuate far less. They behave like points placed too evenly to be random — the low-discrepancy sequences of quasi-Monte Carlo integration, which beat random sampling precisely by refusing to clump — and for the same reason: they are built from a few structured pieces whose irregularities cancel.

Normality cannot tell these apart from randomness, because it is a statement about limiting frequencies only, and both random bits and too-even bits have the right limits. A normal number need not look random at any finite scale in any other sense, and a number that passes every frequency test can still be completely predictable — Stoneham’s digits are generated by a two-line formula, and Champernowne’s by counting. This is the distinction a generator of random numbers has to respect, between statistics that look right and a stream that cannot be predicted: a sequence is useful for simulation if its statistics are right and useful for secrecy only if, in addition, nobody can find the formula. Bailey and Crandall in fact proposed Stoneham-type numbers as pseudorandom generators, with the attraction that their equidistribution is a theorem rather than a hope.

In base six every term stops

The same number in base 6 has a completely different anatomy. Each term is

13k 23k=33k−k63k,\frac{1}{3^k\, 2^{3^k}} = \frac{3^{3^k - k}}{6^{3^k}},

a whole number divided by a power of 6, so in base 6 it is a terminating fraction: the base-6 digits of the whole number 33k−k3^{3^k - k}, ending exactly at place 3k3^k.

Where each term sits in base 6. k=1: digits 2–3; k=2: digits 5–9; k=3: digits 13–27; k=4: digits 34–81; k=5: digits 98–243; k=6: digits 286–729; k=7: digits 851–2187; k=8: digits 2544–6561; k=9: digits 7620–19683; k=10: digits 22850–59049
Fig. 4 The base-6 digit positions occupied by each of the first ten terms of α, on a logarithmic scale.

The whole number 33k−k3^{3^k - k} has about (3k−k)log⁡63(3^k - k)\log_6 3 base-6 digits, and log⁡63=0.613\log_6 3 = 0.613, so the kk-th term occupies places from about 0.387⋅3k0.387 \cdot 3^k to 3k3^k. The next term begins at about 0.387⋅3k+1=1.161⋅3k0.387 \cdot 3^{k+1} = 1.161 \cdot 3^k. Between 3k3^k and 1.161⋅3k1.161 \cdot 3^k no term writes anything, and the digits there are all zero: 16 zeros after place 81, 42 after 243, 121 after 729, 356 after 2,187, 1,058 after 6,561, and so on, each run about 16% as long as its starting position. The figure’s computation checks every digit in every gap among the first sixty thousand.

That is enough to rule out normality. A normal number cannot spend a fixed fraction of every stretch of its digits writing zeros, and Stoneham’s number does exactly that, at every power of three. David Bailey and Jonathan Borwein made the argument precise in 2012: α\alpha is normal in base 2 and not normal in base 6, and more generally each Stoneham number of the same shape is normal in one base and abnormal in another that the formula singles out.

The share of zeros never settles

The share of zeros in base 6 never settles. Share of zeros at gap ends: 94: 0.3617, 282: 0.3652, 846: 0.3452, 2539: 0.3442, 7617: 0.3454, 22852: 0.3430; at 60000: 0.2472.
Fig. 5 The share of zeros among the first n base-6 digits of Stoneham’s number, for n up to 60,000, on a logarithmic scale, with the ends of the long runs of zeros marked.

In base 6 a fair share of zeros is one in six. The running share for α\alpha climbs to about 0.345 at the end of every gap — 0.362, 0.365, 0.345, 0.344, 0.345, 0.343 at the ends of the gaps after 343^4 to 393^9 — and sinks back towards a sixth across each stretch where a term is being written, only to climb again at the next power of three. It oscillates for ever on a logarithmic clock, and so the digit 0 has no limiting frequency in base 6 at all.

The peak value can be predicted from the anatomy alone. At the end of the kk-th gap, near place 1.161⋅3k1.161 \cdot 3^k, every earlier gap has contributed its zeros — about 0.161⋅3j0.161 \cdot 3^j for each j≤kj \le k — and every earlier term has contributed a sixth of its 0.613⋅3j0.613 \cdot 3^j digits, if the digits of the powers of three are themselves evenly spread. Summing the geometric series over jj gives about 32(0.161+0.102)⋅3k\tfrac32 (0.161 + 0.102) \cdot 3^k zeros, which is 0.34 of the 1.161⋅3k1.161 \cdot 3^k digits read. The measured peaks, 0.343 to 0.365, agree; the small excess at the early gaps is the rounding in small powers of three. Normality fails not by a bias but by a refusal to settle.

Two orbits of one number

Stoneham's number under two shifts. Orbit histograms (24 bins): ×2 first bin 0.0415; ×6 first bin 0.1569.
Fig. 6 The orbit of Stoneham’s number under the doubling map and under multiplication by six, as histograms of where the orbit lands in the interval from 0 to 1.

The two expansions are two orbits. Under doubling, a hundred thousand steps of α\alpha’s orbit fill the interval evenly: the first of 24 bins holds 4.15% against a fair 4.17%. Under multiplication by six, forty thousand steps pile into the first bin, which holds 15.7%, because during every run of zeros the orbit sits just above nought: a number whose next hundred base-6 digits are zero is within 6−1006^{-100} of nought, and each multiplication by six carries it only one digit’s worth further away. The same shift on a different alphabet sees a different number.

There is a satisfying symmetry in which maps see which. Multiplying by 2 and by 3 are, in a precise sense, independent operations — no power of 2 is a power of 3 — and Hillel Furstenberg proved in 1967 that a closed set carried into itself by both must be finite or the whole interval — and conjectured the corresponding statement for probability distributions, which is still open. Stoneham’s number is built so that powers of 2 scramble it and powers of 6 do not, which is possible only because 6 contains the 3 that the formula’s denominators are made of.

Other bases, and why the square root of two is harder

Normality in one base settles some others. A number is normal in base 2 exactly when it is normal in base 4, or 8, or any power of 2, because a block of base-4 digits is a block of binary digits read two at a time; so Stoneham’s number is normal in every base 2m2^m. In base 6, and in any base whose powers are related to 6 in the same way, the gaps make it abnormal. In base 3, or base 10, nothing is known in either direction. Normality in bases that are not powers of one another is genuinely independent: there are numbers normal in base 2 and not in base 3, and the reverse, and constructing such numbers was one of the first uses of the dynamics of ×2\times 2 and ×3\times 3.

For 2\sqrt 2 the gap between what is believed and what is known is wider than for any constructed number. Borel conjectured in 1950 that every irrational algebraic number is normal in every base, and the evidence — trillions of digits of 2\sqrt 2 that look exactly like the coin in the second figure — is overwhelming. What has been proved is almost nothing: David Bailey, Jonathan Borwein, Richard Crandall and Carl Pomerance showed in 2004 that among the first NN binary digits of 2\sqrt 2 at least about 2N\sqrt{2N} are ones, a bound that comes from the fact that 2\sqrt 2 squared is a whole number and that its square’s digits must carry somewhere. A fair share would be N/2N/2. The same pattern holds for the digits of a root lifted one place at a time in a pp-adic base: every digit can be computed, and nobody can prove that the digits are evenly spread.

What the computation cannot show

Every digit in every figure is exact: the binary digits come from integer division, the base-6 digits from adding whole numbers, and only the last 64 binary places — where carries from the infinite tail could reach — are discarded. But normality is a statement about infinitely many digits, and no computation reaches it. The binary figures show that two hundred thousand digits are spread more evenly than coin tosses; the proof that they stay so is Bailey and Crandall’s, and nothing in the figures could replace it.

The base-6 failure is different in kind, because the gaps can be proved from the formula, digit by digit, for every power of three — the computation only illustrates them. That asymmetry is the general one. Abnormality can be exhibited, since it needs only a pattern that recurs; normality can only be proved, since no finite stretch of digits says anything about the rest.

Still open: a number met for another reason

Is any constant that arises outside the study of digits normal in any base? Stoneham’s numbers, and the related numbers of Bailey and Crandall built from the hypothesis that certain formulas for π\pi, log⁡2\log 2 and their relatives behave like random generators, sit on the boundary: they have formulas, but formulas chosen for their arithmetic. For π\pi, ee, 2\sqrt 2 and log⁡2\log 2 themselves normality is open in every base, and so is the weaker statement that every digit appears with positive frequency. Bailey and Crandall showed that the normality of π\pi in base 16 would follow from a hypothesis about a specific chaotic sequence of the kind their proof handles, so the gap has been narrowed to a precise statement about the uniformity of one sequence — and that statement is unproved, in the same way and for the same reasons as the arcsine law for the cosines of the powers of two.

A normal number with a blind spot

Stoneham’s number is a sum of fractions that never stop in base 2 and always stop in base 6, and that one fact decides both of its fates. In base 2 each term is the repeating expansion of 1/3k1/3^k, whose period 2⋅3k−12 \cdot 3^{k-1} is as long as it can be, and the superposition is provably normal — more even, over two hundred thousand digits, than fair tosses. In base 6 each term is a whole number ending at place 3k3^k, the gaps between them are zeros, the share of zeros swings up to about 0.345 at every power of three, and the orbit under multiplication by six lingers near nought: normal for one shift, abnormal for another, and a theorem both ways.

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.

Decimal expansionDoubling mapEquidistributionMultiplicative orderNormal numberShift mapSymbolic dynamics