MathomalyA field guide to patterns, proofs and open questions

ExplorationsDelete the terms that contain a 9 and a series that grows forever stops growing

Kempner’s Series

Exhaustively checkedseriesharmonic seriesconvergenceintermediate

1 + 1/2 + 1/3 + 1/4 + … grows without , though it needs 12,367 terms to pass 10. Now delete every term whose contains a 9: 1/9, 1/19, 1/90 and the rest. Only 19 of the first hundred denominators are deleted, yet the sum that is left stops growing and approaches about 22.92067, a value computed by Baillie in 1979. The page counts why: in long numbers, most whole numbers contain a 9.

Interactive laboratory

Current view: The first terms

See which of the first hundred denominators are kept and the exact sum of the kept reciprocals.

The first terms · without the digit 99

1 to 100 · kept 81 · deleted 19 · sum ≈ 4.781848

exactly 236726383953603548910881677953283 / 49505200934463491862531463536960

A struck-through number has a 9 in its digits, so its reciprocal is left out. The sum is an exact fraction of whole numbers, checked in the tests against a second sum over one common denominator.

Every number so far and the running exact sum
The whole numbers 1 to 100: whether each contains a 9, and the exact sum of the kept reciprocals so far
DenominatorIts termSum so far
11/11.000000
21/21.500000
31/31.833333
41/42.083333
51/52.283333
61/62.450000
71/72.592857
81/82.717857
9deleted2.717857
101/102.817857
111/112.908766
121/122.992099
131/133.069022
141/143.140451
151/153.207117
161/163.269617
171/173.328441
181/183.383996
19deleted3.383996
201/203.433996
211/213.481616
221/223.527070
231/233.570548
241/243.612215
251/253.652215
261/263.690677
271/273.727714
281/283.763428
29deleted3.763428
301/303.796761
311/313.829019
321/323.860269
331/333.890572
341/343.919984
351/353.948555
361/363.976333
371/374.003360
381/384.029676
39deleted4.029676
401/404.054676
411/414.079066
421/424.102876
431/434.126132
441/444.148859
451/454.171081
461/464.192820
471/474.214097
481/484.234930
49deleted4.234930
501/504.254930
511/514.274538
521/524.293769
531/534.312637
541/544.331155
551/554.349337
561/564.367194
571/574.384738
581/584.401979
59deleted4.401979
601/604.418646
611/614.435040
621/624.451169
631/634.467042
641/644.482667
651/654.498051
661/664.513203
671/674.528128
681/684.542834
69deleted4.542834
701/704.557120
711/714.571204
721/724.585093
731/734.598792
741/744.612305
751/754.625639
761/764.638796
771/774.651783
781/784.664604
79deleted4.664604
801/804.677104
811/814.689450
821/824.701645
831/834.713693
841/844.725598
851/854.737362
861/864.748990
871/874.760485
881/884.771848
89deleted4.771848
90deleted4.771848
91deleted4.771848
92deleted4.771848
93deleted4.771848
94deleted4.771848
95deleted4.771848
96deleted4.771848
97deleted4.771848
98deleted4.771848
99deleted4.771848
1001/1004.781848
Play the figure
a kept number
its reciprocal is added
a struck-through number
it contains the string, so its term is deleted
a faint number
not reached yet

Each cell is a whole number from 1 to 100. A kept number has its reciprocal added to the sum; a struck-through number contains the forbidden string, so its term is deleted. The exact sum below the grid is a fraction of whole numbers, and the table lists every number reached with the running sum.

Of the whole numbers 1 to 100, 81 keep their term and 19 lose it because they contain a 9. The exact sum of the kept reciprocals is about 4.781848.

Deleted
9
Numbers reached
100
Terms kept
81
How this page is laid out

Make a prediction

in total

Change the assumption

What this assumes
Deleting only a thin slice of the terms cannot change whether a series that diverges still diverges.
What breaks it
The deleted terms are a pattern that shows up in almost every long number. A string of digits does this however long it is, because once a number is long enough it almost always contains it.
Where it holds

Deleting finitely many terms, or any set of terms whose own reciprocals add to a finite amount, such as every perfect square: what is left still diverges.

The forbidden digit

One to three digits. A term is deleted when its denominator contains them, in that order.

Step by step

Run, Step and Reset are under the grid. Speed sets how fast Run reveals the numbers.

Speed

Moves how many whole numbers have been looked at.

Cases worth seeing

Try this

Switch the forbidden digit through 1 to 9 on the crawl view. Do the partial sums at a million denominators agree, and which digit leaves the most?

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 hand with every term deleted whose contains a 9, followed for the first ten denominators. The sum is kept as an exact , so nothing is rounded.
  1. the first eight terms, none containing a 91 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/7 + 1/8761/280every from 1 to 8 is kept, and the sum is exact over the common denominator 280
  2. the ninth term, 1/99 contains a 9, so its term is left out761/280a deleted term changes nothing, so the sum is the same as before
  3. the tenth term, 1/10761/280 + 1/10789/28010 has no 9, so its term is added: 1/10 is 28/280
The laboratory does exactly this for the first hundred numbers and any digit or string of up to three digits, and shows the running sum as a . The first view lays the numbers out; the others follow the sum a million terms in and count which numbers survive.
The deletion barely touches the early terms: the first hundred numbers lose only 19 terms. The effect is entirely in the long numbers, where nearly every number contains a 9.
01

What you are seeing

A series that grows forever, with some of its terms removed

is 1 + 1/2 + 1/3 + 1/4 + …, the reciprocal of every whole number. Its terms shrink towards zero, which makes it tempting to think the sum must settle. It does not. Added far enough, the sum passes 10, then 100, then any number you name, although it needs 12,367 terms to pass 10 and a number of terms with more than 40 digits to pass 100.

Now cross out every term whose , written in ordinary digits, contains a 9. The terms 1/9, 1/19, 1/29 … 1/90 … 1/99 go, and so does 1/1990. The page lets you pick the digit, or a short string of digits, and shows the first hundred numbers with the survivors marked.

What is left is a series with infinitely many terms, and it does settle. Its sum is finite, about 22.92067. That is the surprise, and the rest of the page is about why and about how slowly it happens.

02

Why it starts to make sense

Long numbers nearly always contain a 9

Among one-digit numbers, 1 of 9 contains a 9. Among two-digit numbers, 18 of 90 do. In every extra digit, another 9 can turn up, and the share of numbers that avoid it shrinks by a tenth each time: at six digits only about 53% of the numbers have no 9, and at twenty-four digits about 8%.

So the deleted terms are a small slice of the early terms and almost all of the later ones. The survivors in each block of numbers with the same number of digits grow ninefold from one block to the next, while the block itself grows tenfold, so their share keeps falling. The counting view tabulates this exactly.

The still climb, and very slowly. A million terms is not a small number, yet the sum of the surviving terms among them is about half of the . Nothing about a short run tells you where it ends, which is why the limit on this page is quoted from the literature rather than computed.

03

The key idea

Compare each block of lengths with a

Sort the by their number of digits. Numbers with k digits are all at least 10^(k−1), so their reciprocals are all at most 1/10^(k−1). Among those numbers, at most 8 · 9^(k−1) survive, because the first digit can be any of 8 choices (1 to 8) and every later digit any of 9 (0 to 8). The k-digit numbers therefore add at most 8 · 9^(k−1) / 10^(k−1) = 8 · (0.9)^(k−1).

That is a with 0.9. It adds up to 8 · 10 = 80, whatever happens beyond. The true sum is much smaller, since the bound pretends that every surviving number is as small as it could be, which makes its reciprocal as large as possible, but a finite bound is all that needs.

has no such saving: its k-digit block adds about the same amount, ln 10 ≈ 2.3, for every k, and adding 2.3 infinitely often is infinite.

04

Formal statement

Counting numbers that avoid a string

Let be a string of digits and let be the set of -digit whole numbers whose decimal expansion does not contain . for is

For a single non-zero digit,

For a string of digits, and

is the case with nothing deleted, and diverges.

05

Proof

diverges, and the does not

first. For each , the terms from to are each at least , so together they add at least . There are infinitely many such groups, so the pass every bound.

Now delete every term containing a 9. Take the numbers with exactly digits and no 9. The first digit has 8 choices, 1 to 8, and each of the other digits has 9 choices, 0 to 8, so there are of them. Each is at least , so each reciprocal is at most , and the whole group adds at most . Summing over every ,

Every of the series is at most the sum of the groups it touches, so every partial sum is below 80. The partial sums only grow, and an increasing that is bounded . That finishes the for the digit 9, and it works for any non-zero digit. For 0 the first digit has 9 choices and the count is , giving 90.

For a longer string of digits, cut the positions into blocks of consecutive digits, with positions left over. A number that avoids has no block equal to , so each block has choices and the leftover positions have each. At most numbers survive. Each reciprocal is again at most , so length adds at most , and since each value of occurs for at most lengths, the total is at most . The bound is enormous, and finite.

What the does not give is the sum. The kernel checks the counts: it counts the survivors exactly with an automaton and compares with enumeration up to six digits, and checks that the counts never exceed the bound used here.

06

Limits and further questions

What the page computes, and what it only quotes

The on the crawl view are computed here, by adding doubles up to a million , and the exact on the first view are computed in exact arithmetic. The are not computed here. The sum for the digit 9, about 22.92067 66192 64150 34816, is Baillie's value (1979), and the value for the string 42, about 228.4463, is from Schmelzer and Baillie (2008), whose paper gives an algorithm for summing such slowly series. Kempner proved convergence in 1914.

The page offers strings of up to three digits and up to a million. A longer string too, by the same argument, and to a larger than any shown. The partial sums for 999 hardly differ from the full at a million terms, and the limit of the 999-free series is far above anything the page could add up to.

The page does not say how large the is for every digit, and does not claim that approach the limit at any rate: the counting argument gives a bound, not a speed.

What is actually established

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

Proved

The harmonic series 1 + 1/2 + 1/3 + … has partial sums that grow without bound.

Scope
The ordinary sum of the reciprocals of all positive whole numbers, in exact arithmetic.
Why
Group the terms 1/(2^k + 1) to 1/2^(k+1): there are 2^k of them and each is at least 1/2^(k+1), so the group adds at least 1/2. Infinitely many groups each add at least 1/2, so the sum passes any bound.
Status checked
Exhaustively checked

The harmonic sum 1 + 1/2 + … + 1/12,366 is at most 10 and 1 + 1/2 + … + 1/12,367 is more than 10.

Scope
The two sums named, in exact integer arithmetic over one common denominator. It says nothing about any other threshold.
Why
A double-precision loop finds 12,367 as the first term at which the sum passes 10, and the test repeats the comparison in exact integers so that rounding cannot move the answer.
Computation (exact)
Exact comparison of the sum of the common denominator divided by n, for n up to 12,367, with ten times the common denominator, in BigInt. Algorithm kempner-1.
Status checked
Proved

The sum of 1/n over all positive whole numbers n whose digits contain no 9 is finite, and is at most 80. For a forbidden string of m digits, the sum is finite and at most 10 · m · 10^m.

Scope
The sum over the whole infinite series, for the digit 9 and, with the same argument, for any digit or digit string. The bound 80 is for a non-zero digit; the proof gives 90 for 0. The bound is far above the actual sum, about 22.92067 for the digit 9.
Why
There are 8 · 9^(k−1) whole numbers with k digits and no 9, since the first digit has 8 choices and each later digit 9. Each is at least 10^(k−1), so its reciprocal is at most 10^−(k−1) and the k-digit numbers add at most 8 · (9/10)^(k−1). Summing the geometric series over every k gives 8 · 10 = 80. For a string of m digits, cut the k digits into ⌊k/m⌋ blocks of m: a number that avoids the string has no block equal to it, so at most (10^m − 1)^⌊k/m⌋ · 10^(k mod m) numbers of length k survive, and the same argument gives a finite total. The tests count the survivors with an automaton, compare them with enumeration, and check the bound.
Status checked
Proved

The sum of 1/n over whole numbers with no 9 is about 22.92067 66192 64150 34816, and over whole numbers with no 42 it is about 228.44630 41592 30813 25415.

Scope
Cited and not computed here. The values are those given in the literature for the infinite sums; the page draws the first one as a dotted line and computes only partial sums up to a million denominators, which are far below them.
Why
Computing a limit this slowly convergent by adding terms is hopeless: after a million terms the 9-free sum is about half of the limit. Baillie (1979) and Schmelzer and Baillie (2008) computed the sums by methods other than adding terms one by one, and the page does not repeat them.
Status checked
Exhaustively checked

The exact partial sums agree with a sum over one common denominator, the digit test with a string search, and the counts of surviving numbers with enumeration.

Scope
Every digit and eight digit strings for the digit test up to 20,000; the exact sum for five patterns at six limits up to 150; the survivor counts for ten patterns up to six digits; the bound for six patterns up to 30 digits. Nothing beyond these ranges.
Why
Each is a second implementation sharing no code with the first, so agreement checks the kernel and not the page’s reasoning.
Computation (exact)
Exact rational sums against one common denominator; survivor counts for ten patterns and lengths 1 to 6 against enumeration; the block bound for six patterns and lengths 1 to 30. Algorithm kempner-1.
Status checked
Observed in this run

The partial sums on the crawl view are double-precision sums, and they cover denominators up to a million.

Scope
Denominators 1 to 1,000,000 at the checkpoints shown, added as doubles. They are evidence about those partial sums only and say nothing about the limit.
Why
At small checkpoints they agree with the exact rational sum to better than one part in 10^12 in the tests. At a million terms rounding error is of the order of 10^−10, far below the four decimals printed.
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. A. J. Kempner, A Curious Convergent Series, The American Mathematical Monthly 21(2), 48–50, 1914. Link

    The first proof that the harmonic series with every term deleted whose denominator contains a 9 converges. The page proves the same statement itself in its proof layer, by counting; this is cited for priority.

    Bibliographic record checked. This is not an independent verification of the proof.

    Bibliographic review:

    AI-assisted bibliographic audit. Evidence type: publisher record.

    The DOI registry record gives the title, the author A. J. Kempner, the American Mathematical Monthly, volume 21, issue 2, pages 48–50, February 1914. The article text was not inspected, so the form of Kempner’s argument is not attributed here.

  2. Robert Baillie, Sums of Reciprocals of Integers Missing a Given Digit, The American Mathematical Monthly 86(5), 372–374, 1979. Link

    Cited for the value of the sum with the digit 9 deleted, about 22.92067 66192 64150 34816 as given on the Kempner series reference pages. The page quotes the value and does not compute it.

    Bibliographic record checked. This is not an independent verification of the proof.

    Bibliographic review:

    AI-assisted bibliographic audit. Evidence type: publisher record.

    The DOI registry record gives the title, the author Robert Baillie, the American Mathematical Monthly, volume 86, issue 5, pages 372–374, May 1979. The article text was not inspected, so the digits quoted on the page rest on the secondary reference that gives them and are not read from the paper.

  3. Thomas Schmelzer, Robert Baillie, Summing a Curious, Slowly Convergent Series, The American Mathematical Monthly 115(6), 525–540, 2008. Link

    Cited for an algorithm that sums such series to many digits and for the sums with a forbidden string, among them the string 42, about 228.44630 41592 30813 25415. The page quotes the value and does not compute it.

    Bibliographic record checked. This is not an independent verification of the proof.

    Bibliographic review:

    AI-assisted bibliographic audit. Evidence type: publisher record.

    The DOI registry record gives the title, the authors Thomas Schmelzer and Robert Baillie, the American Mathematical Monthly, volume 115, issue 6, pages 525–540, June 2008. The article text was not inspected, so the digits quoted on the page rest on the secondary reference that gives them and are not read from the paper.

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