{'fraction_non_alphanumeric': 0.01653363740022805, 'fraction_numerical': 0.004561003420752566, 'mean_word_length': 5.245551601423488, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Rearranging the Alternating Harmonic Series

Why are conditionally convergent series interesting? While mathematicians might undoubtably give many answers to such a question, Riemann's theorem on rearrangements of conditionally convergent series would probably rank near the top of most responses. Conditionally convergent series are those series that converge as written, but do not converge when each of their terms is replaced by the corresponding absolute value. The nineteenth-century mathematician Georg Friedrich Bernhard Riemann (1826-1866) proved that such series could be rearranged to converge to any prescribed sum. Almost every calculus text contains a chapter on infinite series that distinguishes between absolutely and conditionally convergent series. Students see the usefulness of studying absolutely convergent series since most convergence tests are for positive series, but to them conditionally convergent series seem to exist simply to provide good test questions for the instructor. This is unfortunate since the proof of Riemann's theorem is a model of clever simplicity that produces an exact algorithm. It is clear, however, that even with such a simple example as the alternating harmonic series one cannot hope for a closed form solution to the problem of rearranging it to sum to an arbitrary real number. Nevertheless, it is an old result that for any real number of the form ln r , where r is a rational number, there is a very simple rearrangement of the alternating harmonic series having this sum. Moreover, this rearrangement shares, at least in the long run, a nice feature of Riemann's rearrangement, namely that the partial sums at the breaks between blocks of different sign oscillate around the sum of the series.