# Arranging the alternating harmonic series to sum to $\sqrt{2}$

Since the alternating harmonic series $$\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n} = \frac11-\frac12+\frac13-\frac14+\cdots$$ is convergent but not absolutely convergent, any real number can be obtained by suitable re-arrangement and grouping of the terms. But finding a re-arrangement that yields a specific real number can be a challenge.

• Find a grouping/re-arrangement that sums to 1.
• Find a grouping/re-arrangement that sums to 0.

And my real question is:

• Find a grouping/re-arrangement that sums to $\sqrt{2}$.

Later edit:

I believe the re-arrangement leading to any particular real value $\alpha$ is not unique. For example, split the original series into two parts, one with terms $\frac11, -\frac12, \frac15, -\frac16, \frac19, -\frac1{10} \cdots$ and the other with the remaining terms. Each of these can be re-arranged to form $\frac12 \log 2$. By inserting those re-arrangements in the order first term from first group, first term from second group, second term from first group, and so forth, you get a re-arrangement of terms adding to $\log 2$, which is distinct from the "obvious" trivial re-arrangement.

• For example, the most obvious re-arrangement into $(1-\frac12)+(\frac13-\frac14)+\cdots$ sums to $\log(2)$. – Mark Fischler Jan 23 '16 at 16:54
• In general rearrangement is all that's required, not rearrangement and grouping. – David C. Ullrich Jan 23 '16 at 16:56
• The answer will hinge on the meaning of "find." The usual proof yields an explicit rearrangement for any sum $\alpha$. – André Nicolas Jan 23 '16 at 16:59
• @AndréNicolas: I guess that a further progress would be to find a closed form expression for the general term. – Yves Daoust Jan 23 '16 at 17:01
• I can't seem to get rid of the $\log 2$ with simple and regular rearrangements. For example $(\frac11+\frac13-\frac12) + (\frac15+\frac17-\frac14) + (\frac19+\frac1{11}-\frac16) \cdots = \frac32\log 2$. – Mark Fischler Jan 23 '16 at 17:23

There are many rearrangements that give you the desired value in each case. But when does there exist a rearrangement with a consise description?

Rearrangement for zero. $$\sum _{k=1}^{\infty }\big({\frac { -1}{8\,k-6}}+{ \frac { -1}{8\,k-4}}+{\frac { -1}{8\,k-2}}+{\frac { -1 }{8 k}}+{\frac { +1}{2\,k-1}}\big)=0$$ Four evens followed by one odd, repeat.

Proof by asymptotics. As $K \to \infty$,

$$s_0(K):=\sum_{k=1}^K \frac{1}{8k} = \frac{\log K}{8} + \frac{\gamma}{8}+o(1) \\ s_2(K):=\sum_{k=1}^K \frac{1}{8k-2} = \frac{\log K}{8} + \frac{\gamma}{8}+\frac{3\log 2}{8} - \frac{\pi}{16}+o(1) \\ s_4(K):=\sum_{k=1}^K\frac{1}{8k-4} = \frac{\log K}{8} + \frac{\gamma}{8} +\frac{\log 2}{4} + o(1) \\ s_6(K) :=\sum_{k=1}^K \frac{1}{8k-6} = \frac{\log K}{8} + \frac{\gamma}{8}+\frac{3\log 2}{8} + \frac{\pi}{16}+o(1) \\ t_1(K):=\sum_{k=1}^K \frac{1}{2k-1} = \frac{\log K}{2} + \frac{\gamma}{2}+\log 2 + o(1)$$ Then add $$-s_0(K)-s_2(K)-s_4(K)-s_6(K)+t_1(K) = o(1)$$

• Got no Maple. Would it be clear why this adds to $0$ if I knew the sum of those five fractions? – David C. Ullrich Jan 23 '16 at 19:51

I don't really think "take the rearrangement given by the standard proof that for every $x$ there exists a rearrangement that sums to $x$" really counts as an explicit rearrangement.

Here's an explicit rearrangement that sums to $0$.

First imagine all the terms arranged in a rectangular grid. The first column consists of all the terms $1/n$ for odd $n$, in decreasing order; each row row looks like $1/n$, $-1/2n$, $-1/4n$, ... Like so:

1 -1/2 -1/4 -1/8 ...

1/3 -1/6 -1/12 -1/24...

1/5 -1/10 -1/20 -1/40 ...

1/7 -1/14 -1/28 -1/56 ... . . .

Note that each row sums to zero, and we got each term exactly once.

Now traverse that grid in one of the two standard ways that one uses to show that $\Bbb N^2$ is countable. Take the traversal that runs along the boundaries of subsquares. That's a traversal that has the following property:

P: The first $N^2$ terms consist precisely of the first $N$ entries in the first $N$ rows of the grid.

In fact any traversal with property P will work; we can certainly find an "explicit" such traversal if we didn't follow my description of the traversal I have in mind.

Since each row sums to zero and $\sum_{n=N+1}^\infty 2^{-n}=2^{-N}$, the sum of the first $N^2$ terms in the rearranged series is $2^{-N}$ times the sum of $1/n$ over the first $N$ odd values of $n$; this is on the order of $2^{-N}\log(N)$, which tends to zero.

So if $s_n$ is the $n$-th partial sum of the rearrangement the $s_n$ have a subsequence that tends to zero: $$s_{N^2}\to0.$$

Now to show that the series $\sum a_n$ itself sums to $0$ it's enough to show this: $$\lim_{N\to\infty}\sum_{n=N^2+1}^{(N+1)^2}|a_n|=0.$$

That's the sum of the absolute values of the entries in the grid with (i) $1\le\text{ row }\le N+1,\text{col }=N+1$ and the terms with (ii) $\text{row }=N+1,1\le\text{ col }\le N+1.$

The sum of the terms in (i) is again of the order of $2^{-N}\log N$, while the sum of the terms in (ii) is of the order of $1/N$.

• Absolutely awesome, that nails it for the target zero, and a very similar approach also nails it for the target 1, namely, start from 1, and then do the sub-square arrangement trick on the series starting from $\frac12$ to get zero for the remaining terms. – Mark Fischler Jan 23 '16 at 20:07
• @MarkFischler I guess... the subsquare thing is just a detail to get from something massively "regrouped" to a single sequence. After we eliminate $1$ how do we put everything else into a grid where each row sums to zero? – David C. Ullrich Jan 23 '16 at 20:28

Here is how to make a rearrangement that sums up to $1000$, which is a completely arbitrary number, and you may substitute it for any number you like. First of all, let $h_n=\frac{(-1)^{n+1}}n$ be the alternating harmonic sequence in the original order, and let $a_n$ be the rearranged terms in such a way that $$a_n=\cases{h_{2m+1} & the first odd term not taken yet if A_{n-1}\leq 1000\\h_{2m} & the first even term not taken yet if A_{n-1} > 1000}$$ where $A_{n-1}=\sum_{i=1}^{n-1}a_i$ is the sum of all previous terms.

$$1\approx \frac1{1} -\frac1{2} +\frac1{3} +\frac1{5} -\frac1{4} +\frac1{7} +\frac1{9} -\frac1{6} +\frac1{11} +\frac1{13} -\frac1{8} +\frac1{15} +\frac1{17} -\frac1{10} +\frac1{19} +\frac1{21} -\frac1{12} +\frac1{23} +\frac1{25} -\frac1{14} +\frac1{27} -\frac1{16} +\frac1{29} +\frac1{31} -\frac1{18} +\frac1{33} +\frac1{35} -\frac1{20} +\frac1{37} +\frac1{39} -\frac1{22} +\frac1{41} +\frac1{43} -\frac1{24} +\frac1{45} +\frac1{47} -\frac1{26} +\frac1{49} -\frac1{28} +\frac1{51} +\frac1{53} -\frac1{30} +\frac1{55} +\frac1{57} -\frac1{32} +\frac1{59} +\frac1{61} -\frac1{34} +\frac1{63} +\frac1{65} -\frac1{36} +\frac1{67} +\frac1{69} -\frac1{38} +\frac1{71} +\frac1{73} -\frac1{40} +\frac1{75} -\frac1{42} +\frac1{77} +\frac1{79} -\frac1{44} +\frac1{81} +\frac1{83} -\frac1{46} +\frac1{85} +\frac1{87} -\frac1{48} +\frac1{89} +\frac1{91} -\frac1{50} +\frac1{93} +\frac1{95} -\frac1{52} +\frac1{97} -\frac1{54} +\frac1{99} +\frac1{101} -\frac1{56} +\frac1{103} +\frac1{105} -\frac1{58} +\frac1{107} +\frac1{109} -\frac1{60} +\frac1{111} +\frac1{113} -\frac1{62} +\frac1{115} +\frac1{117} -\frac1{64} +\frac1{119} +\frac1{121} -\frac1{66} +\frac1{123} -\frac1{68} +\frac1{125} +\frac1{127} -\frac1{70} +\frac1{129} +\frac1{131} -\frac1{72} +\frac1{133} +\frac1{135} -\frac1{74} +\frac1{137} +\frac1{139} -\frac1{76} +\frac1{141} +\frac1{143} -\frac1{78} +\frac1{145} -\frac1{80} +\frac1{147} +\frac1{149} -\frac1{82} +\frac1{151} +\frac1{153} -\frac1{84} +\frac1{155} +\frac1{157} -\frac1{86} +\frac1{159} +\frac1{161} -\frac1{88} +\frac1{163} +\frac1{165} -\frac1{90} +\frac1{167} +\frac1{169} -\frac1{92} +\frac1{171} -\frac1{94} +\frac1{173} +\frac1{175} -\frac1{96} +\frac1{177} +\frac1{179} -\frac1{98} +\frac1{181} +\frac1{183} -\frac1{100} \cdots$$

$$0\approx\frac1{1} -\frac1{2} -\frac1{4} -\frac1{6} -\frac1{8} +\frac1{3} -\frac1{10} -\frac1{12} -\frac1{14} -\frac1{16} +\frac1{5} -\frac1{18} -\frac1{20} -\frac1{22} -\frac1{24} +\frac1{7} -\frac1{26} -\frac1{28} -\frac1{30} -\frac1{32} +\frac1{9} -\frac1{34} -\frac1{36} -\frac1{38} -\frac1{40} +\frac1{11} -\frac1{42} -\frac1{44} -\frac1{46} -\frac1{48} +\frac1{13} -\frac1{50} -\frac1{52} -\frac1{54} -\frac1{56} +\frac1{15} -\frac1{58} -\frac1{60} -\frac1{62} -\frac1{64} +\frac1{17} -\frac1{66} -\frac1{68} -\frac1{70} -\frac1{72} +\frac1{19} -\frac1{74} -\frac1{76} -\frac1{78} -\frac1{80} +\frac1{21} -\frac1{82} -\frac1{84} -\frac1{86} -\frac1{88} +\frac1{23} -\frac1{90} -\frac1{92} -\frac1{94} -\frac1{96} +\frac1{25} -\frac1{98} -\frac1{100} -\frac1{102} -\frac1{104} +\frac1{27} -\frac1{106} -\frac1{108} -\frac1{110} -\frac1{112} +\frac1{29} -\frac1{114} -\frac1{116} -\frac1{118} -\frac1{120} +\frac1{31} -\frac1{122} -\frac1{124} -\frac1{126} -\frac1{128} +\frac1{33} -\frac1{130} -\frac1{132} -\frac1{134} -\frac1{136} +\frac1{35} -\frac1{138} -\frac1{140} -\frac1{142} -\frac1{144} +\frac1{37} -\frac1{146} -\frac1{148} -\frac1{150} -\frac1{152} +\frac1{39} -\frac1{154} -\frac1{156} -\frac1{158} -\frac1{160} +\frac1{41} -\frac1{162} -\frac1{164} -\frac1{166} -\frac1{168} +\frac1{43} -\frac1{170} -\frac1{172} -\frac1{174} -\frac1{176} +\frac1{45} -\frac1{178} -\frac1{180} -\frac1{182} -\frac1{184} +\frac1{47} -\frac1{186} -\frac1{188} -\frac1{190} -\frac1{192} +\frac1{49} -\frac1{194} -\frac1{196} -\frac1{198} -\frac1{200} +\frac1{51} -\frac1{202} -\frac1{204} -\frac1{206} -\frac1{208} +\frac1{53} -\frac1{210} -\frac1{212} -\frac1{214} -\frac1{216} +\frac1{55} -\frac1{218} -\frac1{220} -\frac1{222} -\frac1{224} +\frac1{57} -\frac1{226} -\frac1{228} -\frac1{230} -\frac1{232} +\frac1{59} -\frac1{234} -\frac1{236} -\frac1{238} -\frac1{240} +\frac1{61} -\frac1{242} -\frac1{244} -\frac1{246} -\frac1{248} +\frac1{63} -\frac1{250} -\frac1{252} -\frac1{254} -\frac1{256} +\frac1{65} -\frac1{258} -\frac1{260} -\frac1{262} -\frac1{264} +\frac1{67} -\frac1{266} -\frac1{268} -\frac1{270} -\frac1{272} +\frac1{69} -\frac1{274} -\frac1{276} -\frac1{278} -\frac1{280} +\frac1{71} -\frac1{282} -\frac1{284} -\frac1{286} -\frac1{288} +\frac1{73} -\frac1{290} -\frac1{292} -\frac1{294} -\frac1{296} +\frac1{75} -\frac1{298} -\frac1{300} -\frac1{302} -\frac1{304} +\frac1{77} -\frac1{306} -\frac1{308} -\frac1{310} -\frac1{312} +\frac1{79} -\frac1{314} -\frac1{316} -\frac1{318} -\frac1{320} +\frac1{81} -\frac1{322} -\frac1{324} -\frac1{326} -\frac1{328} +\frac1{83} -\frac1{330} -\frac1{332} -\frac1{334} -\frac1{336} +\frac1{85} -\frac1{338} -\frac1{340} -\frac1{342} -\frac1{344} +\frac1{87} -\frac1{346} -\frac1{348} -\frac1{350} -\frac1{352} +\frac1{89} -\frac1{354} -\frac1{356} -\frac1{358} -\frac1{360} +\frac1{91} -\frac1{362} -\frac1{364} -\frac1{366} -\frac1{368} +\frac1{93} -\frac1{370} -\frac1{372} -\frac1{374} -\frac1{376} +\frac1{95} -\frac1{378} -\frac1{380} -\frac1{382} -\frac1{384} +\frac1{97} -\frac1{386} -\frac1{388} -\frac1{390} -\frac1{392} \cdots$$

$$\sqrt2\approx\frac1{1} +\frac1{3} +\frac1{5} -\frac1{2} +\frac1{7} +\frac1{9} +\frac1{11} +\frac1{13} -\frac1{4} +\frac1{15} +\frac1{17} +\frac1{19} +\frac1{21} -\frac1{6} +\frac1{23} +\frac1{25} +\frac1{27} +\frac1{29} -\frac1{8} +\frac1{31} +\frac1{33} +\frac1{35} +\frac1{37} +\frac1{39} -\frac1{10} +\frac1{41} +\frac1{43} +\frac1{45} +\frac1{47} -\frac1{12} +\frac1{49} +\frac1{51} +\frac1{53} +\frac1{55} -\frac1{14} +\frac1{57} +\frac1{59} +\frac1{61} +\frac1{63} -\frac1{16} +\frac1{65} +\frac1{67} +\frac1{69} +\frac1{71} -\frac1{18} +\frac1{73} +\frac1{75} +\frac1{77} +\frac1{79} +\frac1{81} -\frac1{20} +\frac1{83} +\frac1{85} +\frac1{87} +\frac1{89} -\frac1{22} +\frac1{91} +\frac1{93} +\frac1{95} +\frac1{97} -\frac1{24} +\frac1{99} +\frac1{101} +\frac1{103} +\frac1{105} -\frac1{26} +\frac1{107} +\frac1{109} +\frac1{111} +\frac1{113} +\frac1{115} -\frac1{28} +\frac1{117} +\frac1{119} +\frac1{121} +\frac1{123} -\frac1{30} +\frac1{125} +\frac1{127} +\frac1{129} +\frac1{131} -\frac1{32} +\frac1{133} +\frac1{135} +\frac1{137} +\frac1{139} -\frac1{34} +\frac1{141} +\frac1{143} +\frac1{145} +\frac1{147} +\frac1{149} -\frac1{36} +\frac1{151} +\frac1{153} +\frac1{155} +\frac1{157} -\frac1{38} +\frac1{159} +\frac1{161} +\frac1{163} +\frac1{165} -\frac1{40} +\frac1{167} +\frac1{169} +\frac1{171} +\frac1{173} -\frac1{42} +\frac1{175} +\frac1{177} +\frac1{179} +\frac1{181} -\frac1{44} +\frac1{183} +\frac1{185} +\frac1{187} +\frac1{189} +\frac1{191} -\frac1{46} +\frac1{193} +\frac1{195} +\frac1{197} +\frac1{199} -\frac1{48} +\frac1{201} +\frac1{203} +\frac1{205} +\frac1{207} -\frac1{50} +\frac1{209} +\frac1{211} +\frac1{213} +\frac1{215} -\frac1{52} +\frac1{217} +\frac1{219} +\frac1{221} +\frac1{223} +\frac1{225} -\frac1{54} +\frac1{227} +\frac1{229} +\frac1{231} +\frac1{233} -\frac1{56} +\frac1{235} +\frac1{237} +\frac1{239} +\frac1{241} -\frac1{58} +\frac1{243} +\frac1{245} +\frac1{247} +\frac1{249} -\frac1{60} +\frac1{251} +\frac1{253} +\frac1{255} +\frac1{257} +\frac1{259} -\frac1{62} +\frac1{261} +\frac1{263} +\frac1{265} +\frac1{267} -\frac1{64} +\frac1{269} +\frac1{271} +\frac1{273} +\frac1{275} -\frac1{66} +\frac1{277} +\frac1{279} +\frac1{281} +\frac1{283} -\frac1{68} +\frac1{285} +\frac1{287} +\frac1{289} +\frac1{291} -\frac1{70} +\frac1{293} +\frac1{295} +\frac1{297} +\frac1{299} +\frac1{301} -\frac1{72} +\frac1{303} +\frac1{305} +\frac1{307} +\frac1{309} -\frac1{74} +\frac1{311} +\frac1{313} +\frac1{315} +\frac1{317} -\frac1{76} +\frac1{319} +\frac1{321} +\frac1{323} +\frac1{325} -\frac1{78} +\frac1{327} +\frac1{329} +\frac1{331} +\frac1{333} +\frac1{335} -\frac1{80} +\frac1{337} +\frac1{339} +\frac1{341} +\frac1{343} -\frac1{82} +\frac1{345} +\frac1{347} +\frac1{349} +\frac1{351} -\frac1{84} +\frac1{353} +\frac1{355} +\frac1{357} +\frac1{359} -\frac1{86} +\frac1{361} +\frac1{363} +\frac1{365} +\frac1{367} -\frac1{88} +\frac1{369} +\frac1{371} +\frac1{373} +\frac1{375} +\frac1{377} -\frac1{90} +\frac1{379} +\frac1{381} +\frac1{383} +\frac1{385} -\frac1{92} +\frac1{387} +\frac1{389} +\frac1{391} +\frac1{393} -\frac1{94} +\frac1{395} +\frac1{397} +\frac1{399} +\frac1{401} -\frac1{96} +\frac1{403} +\frac1{405} +\frac1{407} +\frac1{409} +\frac1{411} -\frac1{98} +\frac1{413} +\frac1{415} +\frac1{417} +\frac1{419} -\frac1{100} \cdots$$

• Why did you start the sum for $0$ with $-(1/2)+(1/1)$ instead of $(1/1)-(1/2)$? – Barry Cipra Jan 23 '16 at 17:42
• Presumaby his rule is this: if sum so far is $< 0$ then use the next $+$ term, but if the sum so far is $\ge 0$ then use the next $-$ term. So, we have to start with a $-$ term. – GEdgar Jan 23 '16 at 18:00
• @BarryCipra: my code chose for me, you can start both ways :) – Yves Daoust Jan 23 '16 at 20:11

Rearrangement for $\sqrt{2}$

Let $$N_k = \left\lfloor \frac{e^{2\sqrt{2}}}{4}\;k\right\rfloor ; \qquad D_k = N_k - N_{k-1} .$$ So $(D_k)_{k=1}^{20}$ is $$4, 4, 4, 4, 5, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 5, 4, 4, 4, 5, 4, 4, 4$$ and in general, $D_k$ is either $4$ or $5$ in some non-periodic pattern (since $e^{2\sqrt{2}}$ is irrational).

Define a rearrangement of the series in groups. Group $k$ consists of one even term and $D_k$ odd terms: $$\left(\frac{-1}{2}+\frac{+1}{1}+\frac{+1}{3}+\frac{+1}{5}+\frac{+1}{7}\right) + \left(\frac{-1}{4}+\frac{+1}{9}+\frac{+1}{11}+\frac{+1}{13}+\frac{+1}{15}\right) +\dots$$ This rearrangement of the series sums to $\sqrt{2}$.