# Kempner series

The Kempner series$^{:31–33}$ 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
    ${\sideset{'}\sum _{n=1}^{\infty }}{\frac {1}{n}}$
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 counterintuitive because, unlike the harmonic series, it converges. Kempner showed the sum of this series is less than 90. Baillie showed that, rounded to 20 decimals, the actual sum is 22.92067661926415034816 (sequence A082838 in the OEIS).
Heuristically, this series converges because most large integers contain every digit. 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 instances of "42" is about 228.44630415923081325415. Another example: the sum of ⁠1/n⁠ where n has no occurrence of the digit string "314159" is about 2302582.33386378260789202376. (All values are rounded in the last decimal place.)

## Convergence

Kempner's proof of convergence is repeated in some textbooks, for example Hardy and Wright,$^{:120}$ and also appears as an exercise in Apostol.$^{:212}$ The terms of the sum are grouped by the number of digits in the denominator. The number of n-digit positive integers that have no digit equal to '9' is 8 × 9$^{n−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 greater than or equal to 10$^{n−1}$, so the reciprocal of each of these numbers is less than or equal to 10$^{1−n}$. Therefore, 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
    $8\sum _{n=1}^{\infty }\left({\frac {9}{10}}\right)^{n-1}=80.$
The same argument works for any omitted non-zero digit. The number of n-digit positive integers that have no '0' is 9$^n$, so the sum of ⁠1/n⁠ where n has no digit '0' is at most
    $9\sum _{n=1}^{\infty }\left({\frac {9}{10}}\right)^{n-1}=90.$
The series also converge if strings of k digits are omitted, for example if we omit all denominators that have the decimal string 42. This can be proved in almost the same way. First we observe that we can work with numbers in base 10$^k$ 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.
Farhi considered generalized Kempner series, namely, the sums S(d, n) of the reciprocals of the positive integers that have exactly n instances of the digit d where 0 ≤ d ≤ 9 (so that the original Kempner series is S(9, 0)). He showed that for each d the sequence of values S(d, n) for n ≥ 1 is decreasing and converges to 10 ln 10. The sequence is not in general decreasing starting with n = 0; for example, for the original Kempner series we have S(9, 0) ≈ 22.921 < 23.026 ≈ 10 ln 10 < S(9, n) for n ≥ 1.

## Approximation methods

The series converges extremely slowly. Baillie remarks that after summing 10$^{24}$ terms the remainder is still larger than 1.
The upper bound of 80 is very crude. In 1916, Irwin showed that the value of the Kempner series is between 22.4 and 23.3, since refined to the value above, 22.92067...
Baillie considered the sum of reciprocals of j-th powers simultaneously for all j. He developed a recursion that expresses the j-th power contribution from the (k + 1)-digit block in terms of all higher power contributions of the k-digit block. Therefore, with a small amount of computation, the original series (which is the value for j = 1, summed over all k) can be accurately estimated.

## Irwin's generalizations of Kempner's results

In 1916, Irwin also generalized Kempner's results. Let k be a nonnegative integer. Irwin proved that the sum of 1/n where n has at most k occurrences of any digit d is a convergent series.
For example, the sum of 1/n where n has at most one 9, is a convergent series. But the sum of 1/n where n has no 9 is convergent. Therefore, the sum of 1/n where n has exactly one 9, is also convergent. Baillie showed that the sum of this last series is about 23.04428708074784831968.