ExplorationsDelete the terms that contain a 9 and a series that grows forever stops growing
Kempner’s Series
The harmonic series 1 + 1/2 + 1/3 + 1/4 + … grows without limit, though it needs 12,367 terms to pass 10. Now delete every term whose denominator 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
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
| Denominator | Its term | Sum so far |
|---|---|---|
| 1 | 1/1 | 1.000000 |
| 2 | 1/2 | 1.500000 |
| 3 | 1/3 | 1.833333 |
| 4 | 1/4 | 2.083333 |
| 5 | 1/5 | 2.283333 |
| 6 | 1/6 | 2.450000 |
| 7 | 1/7 | 2.592857 |
| 8 | 1/8 | 2.717857 |
| 9 | deleted | 2.717857 |
| 10 | 1/10 | 2.817857 |
| 11 | 1/11 | 2.908766 |
| 12 | 1/12 | 2.992099 |
| 13 | 1/13 | 3.069022 |
| 14 | 1/14 | 3.140451 |
| 15 | 1/15 | 3.207117 |
| 16 | 1/16 | 3.269617 |
| 17 | 1/17 | 3.328441 |
| 18 | 1/18 | 3.383996 |
| 19 | deleted | 3.383996 |
| 20 | 1/20 | 3.433996 |
| 21 | 1/21 | 3.481616 |
| 22 | 1/22 | 3.527070 |
| 23 | 1/23 | 3.570548 |
| 24 | 1/24 | 3.612215 |
| 25 | 1/25 | 3.652215 |
| 26 | 1/26 | 3.690677 |
| 27 | 1/27 | 3.727714 |
| 28 | 1/28 | 3.763428 |
| 29 | deleted | 3.763428 |
| 30 | 1/30 | 3.796761 |
| 31 | 1/31 | 3.829019 |
| 32 | 1/32 | 3.860269 |
| 33 | 1/33 | 3.890572 |
| 34 | 1/34 | 3.919984 |
| 35 | 1/35 | 3.948555 |
| 36 | 1/36 | 3.976333 |
| 37 | 1/37 | 4.003360 |
| 38 | 1/38 | 4.029676 |
| 39 | deleted | 4.029676 |
| 40 | 1/40 | 4.054676 |
| 41 | 1/41 | 4.079066 |
| 42 | 1/42 | 4.102876 |
| 43 | 1/43 | 4.126132 |
| 44 | 1/44 | 4.148859 |
| 45 | 1/45 | 4.171081 |
| 46 | 1/46 | 4.192820 |
| 47 | 1/47 | 4.214097 |
| 48 | 1/48 | 4.234930 |
| 49 | deleted | 4.234930 |
| 50 | 1/50 | 4.254930 |
| 51 | 1/51 | 4.274538 |
| 52 | 1/52 | 4.293769 |
| 53 | 1/53 | 4.312637 |
| 54 | 1/54 | 4.331155 |
| 55 | 1/55 | 4.349337 |
| 56 | 1/56 | 4.367194 |
| 57 | 1/57 | 4.384738 |
| 58 | 1/58 | 4.401979 |
| 59 | deleted | 4.401979 |
| 60 | 1/60 | 4.418646 |
| 61 | 1/61 | 4.435040 |
| 62 | 1/62 | 4.451169 |
| 63 | 1/63 | 4.467042 |
| 64 | 1/64 | 4.482667 |
| 65 | 1/65 | 4.498051 |
| 66 | 1/66 | 4.513203 |
| 67 | 1/67 | 4.528128 |
| 68 | 1/68 | 4.542834 |
| 69 | deleted | 4.542834 |
| 70 | 1/70 | 4.557120 |
| 71 | 1/71 | 4.571204 |
| 72 | 1/72 | 4.585093 |
| 73 | 1/73 | 4.598792 |
| 74 | 1/74 | 4.612305 |
| 75 | 1/75 | 4.625639 |
| 76 | 1/76 | 4.638796 |
| 77 | 1/77 | 4.651783 |
| 78 | 1/78 | 4.664604 |
| 79 | deleted | 4.664604 |
| 80 | 1/80 | 4.677104 |
| 81 | 1/81 | 4.689450 |
| 82 | 1/82 | 4.701645 |
| 83 | 1/83 | 4.713693 |
| 84 | 1/84 | 4.725598 |
| 85 | 1/85 | 4.737362 |
| 86 | 1/86 | 4.748990 |
| 87 | 1/87 | 4.760485 |
| 88 | 1/88 | 4.771848 |
| 89 | deleted | 4.771848 |
| 90 | deleted | 4.771848 |
| 91 | deleted | 4.771848 |
| 92 | deleted | 4.771848 |
| 93 | deleted | 4.771848 |
| 94 | deleted | 4.771848 |
| 95 | deleted | 4.771848 |
| 96 | deleted | 4.771848 |
| 97 | deleted | 4.771848 |
| 98 | deleted | 4.771848 |
| 99 | deleted | 4.771848 |
| 100 | 1/100 | 4.781848 |
- 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
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?
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.
- the first eight terms, none containing a 91 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/7 + 1/8761/280every denominator from 1 to 8 is kept, and the sum is exact over the common denominator 280
- 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
- the tenth term, 1/10761/280 + 1/10789/28010 has no 9, so its term is added: 1/10 is 28/280
What you are seeing
A series that grows forever, with some of its terms removed
The harmonic series 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 denominator, written in ordinary decimal 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.
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 partial sums 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 limit. 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.
The key idea
Compare each block of lengths with a geometric series
Sort the denominators 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 geometric series with ratio 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 convergence needs.
The harmonic series 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.
Formal statement
Counting numbers that avoid a string
Let be a string of decimal digits and let be the set of -digit whole numbers whose decimal expansion does not contain . Kempner's series for is
For a single non-zero digit,
For a string of digits, and
The harmonic series is the case with nothing deleted, and diverges.
Proof
The harmonic series diverges, and the Kempner series does not
The harmonic series 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 partial sums 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 partial sum 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 sequence that is bounded converges. That finishes the proof 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 proof 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.
Limits and further questions
What the page computes, and what it only quotes
The partial sums on the crawl view are computed here, by adding doubles up to a million denominators, and the exact fractions on the first view are computed in exact arithmetic. The limits 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 convergent series. Kempner proved convergence in 1914.
The page offers strings of up to three digits and denominators up to a million. A longer string converges too, by the same argument, and to a limit larger than any partial sum shown. The partial sums for 999 hardly differ from the full harmonic series 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 limit is for every digit, and does not claim that partial sums 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.
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
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
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
- Sources
- A Curious Convergent Series
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
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
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.
- 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.
- 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.
- 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.
Related by mechanism
Connected by how they work, not by sharing a topic label.