Rearrangements of the Alternating Harmonic Series

Helmut Knaust, Department of Mathematical Sciences, UTEP, El Paso TX 79968
hknaust@utep.edu
10/05//2011; last edits 11/11/2011

The alternating harmonic series is the series (∑_(n=1)^∞)((((-1))^(n-1))/n). (It converges to ln 2). Since the series converges conditionally, given any real number L, we can find a bijection φ: ℕ→ℕ such that the rearrangement (∑_(n=1)^∞)((((-1))^(φ(n)-1))/(φ(n)))converges to L.

Commands (Execute first!)

AHSrearranged[L_,step_:15]:=Module[{k=0,sum=0,even=1,odd=2},Do[If[sum≤L,
sum=sum+1/even;k=k+1;Print["φ(",k,") = ",even,"\t+",1/even,"\t",sum," = ",N[sum]];even=even+2;,
sum=sum-1/odd;k=k+1;Print["φ(",k,") = ",odd,"\t-",1/odd,"\t",sum," = ",N[sum]];odd=odd+2;],{step}]]

AHSGraph[L_,step_:25]:=(even=1;odd=2;evenc[0]={};oddc[0]={};sum[0]=0;Do[If[sum[j]≤L,
sum[j+1]=sum[j]+1/even;evenc[j+1]=Append[evenc[j],{even,0}];oddc[j+1]=oddc[j];even=even+2,
sum[j+1]=sum[j]-1/odd;oddc[j+1]=Append[oddc[j],{odd,0}];evenc[j+1]=evenc[j];odd=odd+2];,{j,0,step,1}];
rg=Max[Last[oddc[step+1]][[1]],Last[evenc[step+1]][[1]]];
Manipulate[ListPlot[Table[sum[l],{l,1,j+1}],PlotRange->{{1,rg+1},{-1,2}},Axes->True,PlotStyle->{Green,AbsolutePointSize[5]},AxesOrigin->{1,0},ImageSize->800,Epilog->{{{Green,Line[{{0,L},{rg,L}}]},Blue,AbsolutePointSize[5],Point[oddc[j+1]]},{Red,AbsolutePointSize[5],Point[evenc[j+1]]}}],{j,0,step,1}])

Computation of Rearrangements

The following command prints out φ(1), ..., φ(10), given that L = 1. The first argument is the number L, the second input is the desired number of steps (default: 15 steps).
(Note that, given L,  the function φ is not uniquely determined!)

AHSrearranged[1,10]

Graphical Representation

Below is an animation visualizing the first 100 partial sums (in green). Additionally the series elements already picked are shown (positive terms in red, negative terms in blue).

AHSGraph[1.5,100]

Below is the animation for the limit  ln 2≈0.69, yielding the “natural” order of the harmonic series. (The default for the number of steps is 25.)

AHSGraph[Log[2.]]