The Kempner series is a modification of the harmonic series, formed by omitting all terms whose denominator expressed in base 10 contains the digit 9. That is, it is the sum
where the prime indicates that n takes only values whose decimal expansion has no nines. The series was first studied by A. J. Kempner in 1914. The series is interesting because of the counter-intuitive result that, unlike the harmonic series, the Kempner series converges. Kempner showed the sum of this series is less than 80. Baillie showed that, rounded to 20 decimals, the actual sum is 22.92067 66192 64150 34816 (sequence in the OEIS)).
Heuristically, this series converges because most large integers contain all digits. For example, a random 100-digit integer is very likely to contain at least one '9', causing it to be excluded from the above sum.
Schmelzer and Baillie found an efficient algorithm for the more general problem of any omitted string of digits. For example, the sum of 1/n where n has no "42" is about 228.44630 41592 30813 25415. Another example: the sum of 1/n where n has no occurrence of the digit string "314159" is about 2302582.33386 37826 07892 02376. (All values are rounded in the last decimal place).
Kempner's proof of convergence is repeated in many textbooks, for example Hardy and Wright and Apostol. We group the terms of the sum by the number of digits in the denominator. The number of n-digit positive integers that have no digit equal to '9' is 8(9n−1) because there are 8 choices (1 through 8) for the first digit, and 9 independent choices (0 through 8) for each of the other n−1 digits. Each of these numbers having no '9' is bigger than or equal to 10n−1, so the contribution of this group to the sum of reciprocals is less than 8(9/10)n−1. Therefore the whole sum of reciprocals is at most
The same argument works for any omitted non-zero digit. The number of n-digit positive integers that have no '0' is 9n, so the sum of 1/n where n has no digit '0' is at most
The series also converge if strings of k digits are omitted, for example if we omit all denominators that have a decimal substring of 42. This can be proved in almost the same way. First we observe that we can work with numbers in base 10k and omit all denominators that have the given string as a "digit". The analogous argument to the base 10 case shows that this series converges. Now switching back to base 10, we see that this series contains all denominators that omit the given string, as well as denominators that include it if it is not on a "k-digit" boundary. For example, if we are omitting 42, the base-100 series would omit 4217 and 1742, but not 1427, so it is larger than the series that omits all 42s.