Alternating Harmonic Series

This notebook takes a look at rearrangements of the alternating harmonic series, rearranged so that the sums alternate between r positive terms and s negative terms.
So, for example... the command Alternate[1,1,5] (i.e. r=1, s=1, n=5) provides the first 5 terms of the standard alternating series:
1-1/2+1/3-1/4+1/5
The command Alternate[2,3,11] (i.e. r=2, s=3, n=11) has 11 terms, with groups of 2 positive and 3 negative.
1+1/3  -1/2-1/4-1/6 +1/5+1/7  -1/8 - 1/10 -1/12 + 1/9
“Pos” is a preliminary calculation to determine the number of positive terms (the number of negative terms will then be “n-Pos”).

Pos[r_,s_,n_]:=r*Floor[n/(r+s)]+Min[n-(r+s)Floor[n/(r+s)],r]

Alternate[r_,s_,n_]:=NSum[(1/(2 j-1)),{j,1,Pos[r,s,n]}]-NSum[(1/(2 j)),{j,1, n-Pos[r,s,n]}];

You may change the value for r, s, and n in the following

Alternate[2,3,24]

Here is a plot of the first n=20 partial sums with r=3 and s=2.  You may of course change the values for r, s, and n to experiment with other plots.

DiscretePlot[Alternate[3,2,k],{k,1,20},PlotRange->{0,2}]

And the following two commands will show the actual numerical values for the graph above (mathematica seems to show an error in the Table command. Nonetheless it appears to work.

AlternateList[r_,s_,n_]=Table[{k,Alternate[r,s,k]},{k,1,n}];

Print[AlternateList[3,2,20]]