MathomalyA field guide to patterns, proofs and open questions

ExplorationsA first digit is a fact about how a number was written

Why One Comes First

Heuristicleading digitsequidistributionlogarithmscurious

Newcomb noticed, and Benford later popularised, that many lists lead with 1 far more often than 9. Take positive whole numbers, write each one in base 10, and record only its first digit. give 1, 2, 4, 8, 1, 3, 6, 1, 2, 5; across the first thousand powers, digit 1 appears 301 times where an even split would give about 111. The predicted share of digit d is log(1 + 1/d) in the written base. It is a property of particular processes: from 1 to 999,999 drawn uniformly lead with each digit one ninth of the time.

Interactive laboratory

Current view: First digits counted

Compare the counted first digits of a list with the share predicted for each digit.

First digits counted · Powers of two · base 1030 values

30 values · base 10 · digit 1 30.00% against 30.10% · largest gap 5.80% · seed 20260914

All 30 values are printed above, with the first digit of each marked, so the whole tally can be checked by eye.

Every digit, counted and predicted
The count and share of each first digit over 30 values from the powers of two, written in base 10, beside the predicted share
First digitValues countedShare countedPredicted share
1930.00%30.10%
2620.00%17.61%
3310.00%12.49%
4310.00%9.69%
5310.00%7.92%
6310.00%6.69%
700.00%5.80%
8310.00%5.12%
900.00%4.58%
a digit bar
the share of the values beginning with that digit
the predicted share
the logarithm of 1 + 1/d in this base, marked across the bar rather than fitted to it
the printed values
the first thirty numbers, first digit marked

One bar per possible first digit, its length the share of the listed values that begin with that digit. The notch across each bar is the predicted share, computed from the logarithm rather than fitted to the counts. Beneath the bars the first thirty values of the list are printed out with their first digit marked, so the tally can be checked by eye.

Of 30 values from the powers of two written in base 10, 9 begin with the digit 1, which is 30.00% against a predicted 30.10%. The largest gap between a counted share and its predicted share is 5.80%, which is a distance rather than a test.

Values
30
Base
10
Digit 1
30.00%
Largest gap
5.80%
How this page is laid out

Make a prediction

numbers

Change the assumption

What this assumes
The leading digits of the powers of two follow the logarithmic prediction.
What breaks it
The same powers of two are written in base 16. Only four first digits ever appear, 1, 2, 4 and 8, and each of them begins a quarter of the numbers, give or take one in a short list.
Where it holds

The powers of two written in base 10, and in any base that is not itself a power of two, as the number of powers grows.

Where the numbers come from

Source

A fixed list that no seed changes. The values are exact whole numbers however long they get.

How many values

All 30 values are counted, so this is the exact size of the population behind every bar.

How the numbers are written

Step by step

The counted figures are complete as drawn. Playback belongs to the wrapping points, on the second view.

Speed

Reproducible sample

Only the uniform source uses the seed, and its Draw another sample button appears under the figure when you choose it. The other three give the same list at every seed, because nothing about them is random.

Advanced parameters

Cases worth seeing

Try this

At thirty values the bars are ragged. Raise the count to a thousand and compare the same two bars again. What does a longer list have that a short one is missing?

1/3

What is going on

Each explanation begins with a worked example and follows the same operation through intuition, formal statements and proofs. Later sections distinguish what is established from questions that remain open, so you can follow the level of detail useful to you.

Worked by handDoubling from 1, nine times, and reading only the digit at the front of each result. Three of the ten values begin with a 1.
  1. 11 × 2 = 22The number is a single digit, so its first digit is the whole of it.
  2. 22 × 2 = 44
  3. 44 × 2 = 88
  4. 88 × 2 = 1616Doubling past 9 adds a place, and the first digit drops back to 1.
  5. 1616 × 2 = 3232
  6. 3232 × 2 = 6464
  7. 6464 × 2 = 128128A place is added again, and the first digit is 1 again.
  8. 128128 × 2 = 256256
  9. 256256 × 2 = 512512
  10. the ten values 1 to 5121, 16 and 128 begin with a 13 out of 10Three of the first ten begin with a 1, which is already close to the log₁₀2 ≈ 0.301 the laboratory is about.
The laboratory does exactly this and keeps counting. The default figure prints these values and thirty more, with the tally of first digits beside them, and the mechanism view shows where the tally comes from.
The first digit falls back to 1 every time the number gains a place, and a number gains a place after roughly three and a third doublings. That is the whole reason 1 comes first, written in ten small numbers.
01

What you are seeing

A tally of first digits, and the share predicted for each

Every value in the list is a positive whole number. Write it out in base 10 and look only at the digit on the left. That digit is one of 1 to 9, never 0, because a number is not written with a leading zero. The figure counts how many of the listed values begin with each digit and draws one bar per digit.

Across each bar sits a notch. That notch is the share predicted for that digit, which is log₁₀(1 + 1/d): about 30.1% for digit 1, 17.6% for 2, and 4.6% for 9. It is computed from the digit alone and does not know anything about the list, so it is a prediction placed beside the counts rather than a line fitted through them.

Beneath the bars the first thirty values are printed in full, with the first digit of each marked. At the smallest setting those thirty values are the entire list, so the whole tally can be checked by eye before any larger count is asked for.

02

Why it starts to make sense

Getting from 1 to 2 takes one doubling, getting from 9 to 10 takes a tenth of one

Start at 1 and keep doubling. To move the first digit off 1 you need one doubling, from 1 to 2. To move it off 2 you need one more. But once you reach 8, a single doubling takes you to 16 and the first digit is 1 again, having skipped 9 entirely.

That asymmetry is not about doubling. It is about the ruler. On a scale where equal distances mean equal multiplications, the stretch occupied by the numbers beginning with 1, from 1 to 2, is a of 2 wide. The stretch beginning with 9, from 9 to 10, is a factor of 10/9 wide, which is about 1.11. The first stretch is more than six times the second.

So if a process moves along that multiplying scale without preferring any particular place on it, it will spend more of its time in the wide stretch near the front than in the narrow one at the back. The move along it in equal strides. The uniform draws do not move along it at all, and that is exactly why they behave differently.

03

The key idea

One , one point on a strip of length 1

Take and the multiplying becomes adding. Write 2ⁿ = 10^(n log₁₀ 2). The n log₁₀ 2 splits into two parts: the whole number in front of the point, which says only how many digits 2ⁿ has, and the part after the decimal point, which says what those digits are.

Throw away the whole part and keep the . Every is now one point in the interval from 0 to 1, and that is the strip the mechanism view draws. The powers beginning with a 1 are exactly the points below log₁₀ 2 ≈ 0.301, because a number whose has fractional part below 0.301 sits between 10^k and 2 × 10^k. That stretch is shaded, and Run drops the points onto the strip one at a time in order.

Now the question has changed shape. It is no longer "why does 1 come first" but "how do these points sit on the strip". They are the fractional parts of 0.301, 0.602, 0.903, 1.204, and so on, each one 0.301 further along and wrapping when it passes the end. Because log₁₀ 2 is , no point ever lands where an earlier one did and the never falls into a . What it does instead is spread out evenly, and the share of the points inside a stretch becomes the length of that stretch.

04

Formal statement

, and the interval each digit owns

Fix a base and a first digit with . A positive written in base begins with exactly when

for some . Taking in base and writing for the fractional part of , this says

an interval of length inside .

A in is when, for every subinterval , the share of the first terms lying in tends to the length of as grows. Weyl proved that for the sequence is equidistributed. Since , the leading digits of the are governed by , and is irrational precisely when is not a power of .

05

Proof

What is settled, and where the settling stops

Put the two paragraphs above together. For a base that is not a power of , the number is , so by Weyl’s the fractional parts are in . The beginning with digit are exactly those whose fractional part lies in an interval of length . The share of them therefore tends to that length, which is the prediction. The follow the same route: the closed form makes equal to plus a constant plus an error that tends to zero, and is irrational.

That is a about a , and this page is careful about the difference. The bars in the figure are counts of a finite list. The first thousand give 301 values beginning with 1, and the prediction for the limit is 30.1%, and the agreement of those two numbers is a pleasant fact about a thousand powers rather than a demonstration of the . No finite count could be one, because a limit says nothing about any particular initial segment.

The uniform case is settled differently and more completely. The from 1 to 999,999 that begin with in base 10 are the six blocks for , holding integers in total, the same for every . That is the entire population counted, so it settles the model outright: uniform integers on that range lead with each digit exactly one ninth of the time, and one ninth is not for any : it falls between the 12.49% predicted for digit 3 and the 9.69% predicted for digit 4.

06

Limits and further questions

Benford is a property of specific processes, not of numbers at large

The failure preset is the important part of this page. Switch the source to uniform draws and the bars flatten. Nothing has gone wrong with the code, and nothing has gone wrong with the digits: a uniform draw from a range that ends at a power of ten really does give every first digit the same share, and the laboratory computes that exact one-ninth distribution and draws it beside the sample rather than leaving the flatness to be inferred.

So the law is not a fact about numbers. It is a fact about processes that move multiplicatively over many orders of magnitude, and about how such a process distributes itself along a logarithmic ruler. A process that does not do that has no reason to obey it, and this page ships one that does not, on purpose.

There is a second failure on the page, and it is quieter. Write the in hexadecimal and they begin only with 1, 2, 4 or 8, each of them exactly a quarter of the time. Nothing has broken here either. Sixteen is itself a power of two, so the of 2 in base 16 is the exact 1/4, and the wrapping points land on four positions and stay there. The in Layer 5 asks for an logarithm, and this base does not supply one. Bases 4 and 8 fail the same way. The condition in a theorem is not decoration, and this is what it looks like when it is not met.

That distinction is why the claim about real-world data is recorded here as a rather than a result. Benford tabulated twenty thousand collected values in 1938 and found the logarithmic shares; Hill showed in 1995 that samples drawn from randomly chosen distributions converge to them. Neither is a about any dataset in front of you, and the behaviour is known to fail for data with a fixed number of digits, an imposed floor or ceiling, or values assigned rather than measured. This page computes nothing about collected data and therefore establishes nothing about it.

The open questions are about which processes qualify. There is no simple test that decides whether a given real-world quantity should follow the law, and the popular use of first-digit tallies to flag suspect accounts rests on assumptions about the underlying process that the tally itself cannot check. What this page can settle, it settles by counting; what it cannot, it labels.

What is actually established

Every statement on this page, with its status, its exact scope, and the date that status was last checked.

Exhaustively checked

Every bar drawn on this page is a count of all the values in the list named beside it, not an estimate from part of it.

Scope
The first N values of the selected source at the selected base, for N up to 5,000 and up to 2,000 for factorials, and for the uniform source the N draws made at the seed shown. The exact uniform distribution drawn beside that sample counts all 999,999 integers from 1 to 999,999.
Why
Each value is built as an exact integer and its first digit read off by integer division, so no rounding enters the counts. What is checked is the tally, and nothing beyond it: the list is finite and was walked in full, which settles what these values do and says nothing about the next one.
Computation (exact)
Exact BigInt arithmetic throughout. Lists of at most 5,000 values, or 2,000 for factorials, where the last term already has 5,736 decimal digits. The uniform population is counted over all 999,999 integers in the range by intervals rather than by sampling. The predicted shares beside the counts are double-precision logarithms. Algorithm benford-1.
Status checked
Proved

The leading digits of the powers of two follow the logarithmic prediction in every base b for which the logarithm of 2 in base b is irrational.

Scope
The limiting shares as the number of powers grows without bound, in any base b where log_b 2 is irrational, which is every base that is not itself a power of 2. The statement is about the limit, so no finite list of powers is obliged to match it, and the counts on this page are the finite list rather than the theorem.
Why
Writing 2^n = b^(n log_b 2) splits the exponent into a whole part, which fixes only how many digits the value has, and a fractional part, which fixes the digits. The power begins with digit d exactly when that fractional part falls in an interval of length log_b(1 + 1/d). Weyl’s theorem says the fractional parts of n times an irrational number are equidistributed over the unit interval, so the share of them landing in that interval is its length.
Status checked
Proved

In base 4, 8 or 16 the powers of two do not follow the prediction at all: they begin only with 1 or 2 in base 4, only with 1, 2 or 4 in base 8, and only with 1, 2, 4 or 8 in base 16, each of that base’s values an equal share of the time.

Scope
The powers of two written in a base that is itself a power of two, which among the bases this laboratory offers means 2, 4, 8 and 16. It says nothing about other sequences in those bases.
Why
If the base is 2 to the power k then the logarithm of 2 in it is exactly 1/k, which is rational. The fractional parts of n/k take only the k values 0, 1/k, … , (k−1)/k and return to them forever, so the first digit of 2 to the power n is one of the k values 2^0 to 2^(k−1) and each occurs one time in k. Weyl’s theorem needs an irrational step and this is what it looks like when the hypothesis is not met. The laboratory draws those k columns on the mechanism view rather than describing them.
Status checked
Proved

The leading digits of the Fibonacci numbers follow the same logarithmic prediction in base 10.

Scope
The limiting shares over the whole sequence. As above, this is a statement about the limit and not about the first thousand terms the laboratory counts.
Why
The closed form makes the nth Fibonacci number the nearest integer to φ^n divided by the square root of 5, so its logarithm is n log φ plus a constant plus a correction that vanishes. The fractional parts of n log₁₀ φ are equidistributed because log₁₀ φ is irrational, and the same interval argument applies.
Status checked
Proved

Integers drawn uniformly from 1 to 999,999 begin with each base-10 digit exactly one ninth of the time, which is not the logarithmic prediction.

Scope
The stated model only: the uniform distribution on the integers from 1 to 999,999, in base 10. A uniform range ending anywhere other than at a power of ten gives a different answer, which the laboratory also computes exactly.
Why
The integers beginning with d are the blocks from d·10^k to (d+1)·10^k − 1 for k = 0 to 5, and each block holds 10^k integers. Every digit therefore gets 1 + 10 + 100 + 1,000 + 10,000 + 100,000 = 111,111 integers out of 999,999, which is one ninth exactly. This is a count of the whole population rather than a sample of it, so it is a proof about the model and not evidence about it.
Status checked
Sources
A basic theory of Benford’s Law citation unresolved
Observed in this run

The uniform bars drawn on this page are the digits of one seeded sample and describe that sample only.

Scope
The draws actually made at the seed and count printed beside the figure. A different seed gives different bars around the same exact one-ninth model.
Why
Every draw comes from a seeded generator rather than the browser’s randomness, so a shared link replays the identical sample. The flat rule beside the bars is the exact model above, drawn for comparison; the sample is not evidence for it and is not offered as any.
Status checked
Heuristic

Collections of real-world measurements are widely reported to follow the logarithmic first-digit distribution.

Scope
This page computes nothing about real-world data and claims nothing for it. The statement records what the literature reports about collected data and the models offered to explain it, and the reported behaviour is known to fail for data with a fixed number of digits, an imposed minimum or maximum, or an assigned rather than measured origin.
Why
Benford tabulated first digits across twenty thousand collected values and found the logarithmic shares, and Hill later showed that samples drawn from randomly chosen distributions converge to them. Neither result is a theorem about any particular dataset, and the survey by Berger and Hill is explicit that the law holds for some processes and not others. Nothing on this page tests a dataset, so nothing on this page supports the claim; it is here because the laboratory would otherwise be read as evidence for it.
Status checked

Sources

Review notes show which bibliographic details Mathomaly has checked and which remain unresolved. Checking a publication record does not independently verify its proof.

  1. Hermann Weyl, Über die Gleichverteilung von Zahlen mod. Eins, Mathematische Annalen, 1916. Link

    The equidistribution theorem this page leans on: for irrational α, the fractional parts of nα spread evenly over the unit interval. It is what turns the wrapping points in the mechanism view into a statement about shares.

    Citation details remain unresolved after review by Mathomaly.

    Bibliographic review:

    AI-assisted bibliographic audit. Evidence type: unresolved.

    The publisher listing supports the author, title, journal and year, but the paper itself was not inspected and no page range was confirmed.

  2. Arno Berger, Theodore P. Hill, A basic theory of Benford’s Law, Probability Surveys, 2011. Link

    A survey that states which sequences provably have the logarithmic first-digit distribution, and is equally careful about which collections of data do not. Cited both for the positive results and for the caveats the heuristic claim on this page rests on.

    Citation details remain unresolved after review by Mathomaly.

    Bibliographic review:

    AI-assisted bibliographic audit. Evidence type: unresolved.

    The journal listing supports the authors, title, volume and year, but the survey was not read through and no individual theorem number was checked against it.

  3. Lawrence C. Washington, Benford’s law for Fibonacci and Lucas numbers, The Fibonacci Quarterly, 1981. Link

    The Fibonacci case, which follows the same route as the powers of two once the closed form is written down. The general statement is also available through the survey cited above.

    Citation details remain unresolved after review by Mathomaly.

    Bibliographic review:

    AI-assisted bibliographic audit. Evidence type: unresolved.

    A scanned copy hosted by the journal carries the author and title, but the issue, pagination and text were not confirmed against an independent record.

  4. Theodore P. Hill, A statistical derivation of the significant-digit law, Statistical Science, 1995. Link

    The result that random samples from randomly chosen distributions converge to the logarithmic law. It is the nearest thing to an explanation of why the law appears in collected data, and it is a statement about a particular sampling model rather than about data in general.

    Citation details remain unresolved after review by Mathomaly.

    Bibliographic review:

    AI-assisted bibliographic audit. Evidence type: unresolved.

    The journal listing supports the author, title, volume and year. The paper was not inspected, and the scope of its hypotheses is described here from the survey rather than from the text.

  5. Frank Benford, The law of anomalous numbers, Proceedings of the American Philosophical Society, 1938. Link

    The paper the law is named after, which tabulated first digits across twenty thousand collected values. It is cited here as the origin of the empirical claim, which this page records as a heuristic rather than repeating as a result.

    Citation details remain unresolved after review by Mathomaly.

    Bibliographic review:

    AI-assisted bibliographic audit. Evidence type: unresolved.

    The archive record supports the author, title, journal and year, but the article sits behind a login and its tables were not inspected.

Connected by how they work, not by sharing a topic label.