# An Elementary Summation Problem with $\varphi(4,n)$

The complete proof is given by Ramanujan.\begin{align*}\varphi(4,n) & =1+\sum\limits_{k=1}^n\left\{\frac 1{4k-1}+\frac 1{4k+1}-\frac 1{2k}\right\}\\ & =\sum\limits_{k=1}^{4n+1}\frac 1k-\frac 12\sum\limits_{k=1}^{2n}\frac 1k-\frac 12\sum\limits_{k=1}^n\frac 1k\\ & =\sum\limits_{k=1}^{3n+1}\frac 1{n+k}-\sum\limits_{k=1}^n\frac 1{2n+2k}\tag{1.1}\\ & =\sum\limits_{k=1}^n\frac 1{n+k}+\sum\limits_{k=0}^n\frac 1{2n+2k+1}\tag{1.2}\end{align*}

And using the second equality in the above equations, we also find that:\begin{align*}\varphi(4,n) & =\sum\limits_{k=1}^{4n+1}\frac 1k-2\sum\limits_{k=1}^{2n}\frac 1{2k}+\frac 12\sum\limits_{k=1}^{2n}\frac 1k-\sum\limits_{k=1}^n\frac 1{2k}\tag{2.1}\\ & =\sum\limits_{k=1}^{4n+1}\frac {(-1)^{k+1}}k+\frac 12\sum\limits_{k=1}^{2n}\frac {(-1)^{k+1}}k\tag{2.2}\end{align*}

Questions:

1. How did Ramanujan get from $(1.1)$ to $(1.2)$?
2. How do you get the second set of equations?
3. What was Ramanujan's thinking when he split$$-\frac 12\sum\limits_{k=1}^{2n}\frac 1{k}=-2\sum\limits_{k=1}^{2n}\frac 1{2k}+\frac 12\sum\limits_{k=1}^{2n}\frac 1k$$

On $(1.1)$

I've spent some time on this, and I am just confused. I understood every step up until $(1.1)$ and $(2.1)$. If we expand $(1.2)$, then we see that$$\sum\limits_{k=1}^n\frac 1{n+k}+\sum\limits_{k=0}^n\frac 1{2n+2k+1}=\left(\frac 1{n+1}+\frac 1{n+2}+\cdots+\frac 1{2n}\right)+\left(\frac 1{2n+1}+\frac 1{2n+3}+\cdots+\frac 1{4n+1}\right)$$And comparing to the line before that,$$\sum\limits_{k=1}^{3n+1}\frac 1{n+k}-\sum\limits_{k=1}^n\frac 1{2n+2k}=\left(\frac 1{n+1}+\frac 1{n+2}+\cdots+\frac 1{4n+1}\right)-\left(\frac 1{2n+2}+\frac 1{2n+4}+\cdots+\frac 1{4n}\right)$$Which is obviously missing a couple of terms. I'm thinking that Ramanujan added a summation, and subtracted, then combined the summations to get $(1.2)$. But I'm not sure how.

On $(2.1)$

I just don't know where to start. I see that Ramanujan broke up the summation from $k=1$ to $2n$, but I don't see how from that, you can derive the second equation.

I'm self taught. So sorry if these problems seem too elementary and basic. I'm still in the learning phase!

## 2 Answers

How did Ramanujan get from $(1.1)$ to $(1.2)$?

Well, I can't promise this is how Ramanujan personally came up with it, but here's a derivation:

\begin{align} \color{red}{\sum_{k=1}^{3n+1}\left(\frac 1{n+k}\right)}-\color{blue}{\sum_{k=1}^n\left(\frac 1{2n+2k}\right)} &= \color{red}{\left[\sum_{k=1}^{n}\left(\frac 1{n+k}\right) + \sum_{k=n+1}^{3n+1}\left(\frac 1{n+k}\right)\right]}-\color{blue}{\sum_{k=1}^n\left(\frac 1{2n+2k}\right)}\,\textrm{split red sum into pieces}\\ &=\sum_{k = 1}^n\left( \color{red}{\frac 1{n+k}} - \color{blue}{\frac 1{2n+2k}}\right)+ \color{red}{\sum_{k = n+1}^{3n + 1}\left(\frac 1{n+k}\right)}\\ &\textrm{pair first red sum and blue sum because the values of }k\textrm{ that they're summing over are the same}\\ &= \color{green}{\sum_{k = 1}^n\left(\frac 1{2n+2k}\right)}+ \color{red}{\sum_{k = n+1}^{3n + 1}\left(\frac 1{n+k}\right)}\,\textrm{red and blue combine to green}\\ &= \color{green}{\sum_{k = 1}^n\left(\frac 1{2n+2k}\right)}+\color{red}{\sum_{j = 0}^{2n}\left(\frac 1{n+j + n + 1}\right)}\\ &\textrm{reindex red sum as sum over }j\textrm{ by substituting }k = j + n + 1\\ &= \color{green}{\sum_{k = 1}^n\left(\frac 1{2n+2k}\right)}+\color{red}{\sum_{k = 0}^{2n}\left(\frac 1{2n+k+1}\right)}\\ &\textrm{the name of the dummy index doesn't matter, so change }j\textrm{ to }k\textrm{ in red sum}\\ &= \color{green}{\sum_{k = 1}^n\left(\frac 1{2n+2k}\right)}+ \left[\color{red}{\sum_{\substack{0\leq k\leq 2n\\k\textrm{ even}}}\left(\frac 1{2n+k + 1}\right)} + \color{blue}{\sum_{\substack{0\leq k\leq 2n\\k\textrm{ odd}}}\left(\frac 1{2n+k + 1}\right)}\right]\\ &\textrm{split up red sum into the sum over even }k\textrm{ (red) plus the sum over odd }k\textrm{ (blue)}\\ &= \color{green}{\sum_{k = 1}^n\left(\frac 1{2n+2k}\right)}+ \left[\color{red}{\sum_{k = 0}^n\left(\frac 1{2n+(2k)+ 1}\right)} + \color{blue}{\sum_{k = 1}^{n}\left(\frac 1{2n+ (2k - 1) + 1}\right)}\right]\\ &\textrm{even numbers are those of the form }2i\textrm{ and odd numbers are those of the form }2i - 1.\\ &\textrm{Use these to index even and odd sums explicitly}\\ &= \color{green}{\sum_{k = 1}^n\left(\frac 1{2n+2k}\right)}+ \left[\color{red}{\sum_{k = 0}^n\left(\frac 1{2n+2k+ 1}\right)} + \color{blue}{\sum_{k = 1}^{n}\left(\frac 1{2n+ 2k }\right)}\right]\,\textrm{simplify}\\ &= (\color{green}{1} + \color{blue}{1})\sum_{k = 1}^n\left(\frac 1{2n+2k}\right) + \color{red}{\sum_{k = 0}^n\left(\frac 1{2n+2k+ 1}\right)}\\ &\textrm{green and blue sums are the same, so combine them}\\ &= \sum_{k = 1}^n\left(\frac 2{2n+2k}\right)+ \color{red}{\sum_{k = 0}^n\left(\frac 1{2n+2k+ 1}\right)}\\ &2(a_1 + a_2 + \dots + a_n) = (2a_1 + 2a_2 + \dots + 2a_n)\textrm{ (i.e., move the }2\textrm{ to the inside of the sum)}\\ &= \sum_{k=1}^n\left(\frac 1{n+k}\right)+\color{red}{\sum_{k=0}^n\left(\frac 1{2n+2k+1}\right)}\,\textrm{simplify}. \end{align}

How do you get the second set of equations?

\begin{align*} \sum\limits_{k=1}^{4n+1}\frac 1k-\frac 12\sum\limits_{k=1}^{2n}\frac 1k-\frac 12\sum\limits_{k=1}^n\frac 1k &= \sum\limits_{k=1}^{4n+1}\frac 1k-\sum\limits_{k=1}^{2n}\frac{1}{2k}-\sum\limits_{k=1}^n\frac{1}{2k} \\ &= \sum\limits_{k=1}^{4n+1}\frac{1}{k} + (1 - 2)\sum\limits_{k=1}^{2n}\frac{1}{2k}-\sum\limits_{k=1}^n\frac{1}{2k}\\ &= \sum\limits_{k=1}^{4n+1}\frac{1}{k} + \sum\limits_{k=1}^{2n}\frac{1}{2k} - 2\sum\limits_{k=1}^{2n}\frac{1}{2k} -\sum\limits_{k=1}^n\frac{1}{2k}\\ &= \sum\limits_{k=1}^{4n+1}\frac{1}{k} + \frac{1}{2}\sum\limits_{k=1}^{2n}\frac{1}{k} - 2\sum\limits_{k=1}^{2n}\frac{1}{2k} -\sum\limits_{k=1}^n\frac{1}{2k}\\ &= \sum\limits_{k=1}^{4n+1}\frac 1k-2\sum\limits_{k=1}^{2n}\frac 1{2k}+\frac 12\sum\limits_{k=1}^{2n}\frac 1k-\sum\limits_{k=1}^n\frac 1{2k}. \end{align*}

Now if you write out each of these four sums, you get $$\underbrace{\left[\frac{1}{1} + \dots + \frac{1}{4n + 1}\right]}_{\textrm{all denominators}} - 2\underbrace{\left[\frac{1}{2} + \dots + \frac{1}{4n}\right]}_{\textrm{even denominators}} + \frac{1}{2}\underbrace{\left[\frac{1}{1} + \dots + \frac{1}{2n}\right]}_{\textrm{all denominators}} - \underbrace{\left[\frac{1}{2} + \dots + \frac{1}{2n}\right]}_{\textrm{even denominators}},$$ which can be viewed as $$\underbrace{\left[\frac{1}{1} + \dots + \frac{1}{4n + 1}\right]}_{\textrm{all denominators}} - 2\underbrace{\left[\frac{1}{2} + \dots + \frac{1}{4n}\right]}_{\textrm{even denominators}} + \frac{1}{2}\left(\underbrace{\left[\frac{1}{1} + \dots + \frac{1}{2n}\right]}_{\textrm{all denominators}} - 2\cdot\underbrace{\left[\frac{1}{2} + \dots + \frac{1}{2n}\right]}_{\textrm{even denominators}}\right).$$

Now you have a $1/k$ for each $1\leq k\leq 4n + 1$ in the first sum, and in the second sum you take away $2/k$ for each even $k$ between $1$ and $4n + 1$. This means that if you combine these, you wind up with $1/k$ for $1\leq k\leq 4n + 1$ when $k$ is even, and $-1/k$ for $1\leq k\leq 4n + 1$ when $k$ is odd. The same logic applies to the last two sums, and you wind up with the desired $$\sum\limits_{k=1}^{4n+1}\frac {(-1)^{k+1}}k+\frac 12\sum\limits_{k=1}^{2n}\frac {(-1)^{k+1}}k.$$

(P.S. you have an extra $k$ floating around in your problem statement - it should be $\sum\limits_{k=1}^{4n+1}\frac {(-1)^{k+1}}k+\frac 12\sum\limits_{k=1}^{2n}\frac {(-1)^{k+1}}k$, not $\sum\limits_{k=1}^{4n+1}\frac {(-1)^{k+1}}k+\frac 12\sum\limits_{k=1}^{2n}\frac {(-1)^{k+1}}k k$.)

What was Ramanujan's thinking when he split$$-\frac 12\sum\limits_{k=1}^{2n}\frac 1{k}=-2\sum\limits_{k=1}^{2n}\frac 1{2k}+\frac 12\sum\limits_{k=1}^{2n}\frac 1k$$

Again, I can't explain Ramanujan's personal thinking. He was extremely clever, and probably saw all the calculations performed above at a glance, and recognized that splitting up the sum in that way would let him combine terms into a pleasing/useful expression.

• I'm sorry, but I am still having trouble with this. For example, I'm not sure how the first equality is true.\begin{align*} \sum_{k=1}^{3n+1}\left(\frac 1{n+k}\right)-\sum_{k=1}^n\left(\frac 1{2n+2k}\right) &= \left[\sum_{k=1}^{n}\left(\frac 1{n+k}\right) + \sum_{k=n+1}^{3n+1}\left(\frac 1{n+k}\right)\right]-\sum_{k=1}^n\left(\frac 1{2n+2k}\right)\end{align*} – Crescendo Jun 17 '17 at 2:21
• In that step, I've just split up the sum into two sums. Instead of summing over all the $k$ from $1$ to $3n + 1$ at once, you can sum the $k$ from $1$ to $n$, and then add that to the sum of $k$ from $n + 1$ to $3n + 1$. Think: $(a + b + c + d) = (a + b) + (c + d)$. – Stahl Jun 17 '17 at 2:23
• Ah, okay. Thank you! I see now. The colours helped a lot! :) – Crescendo Jun 18 '17 at 22:06

In (1.1) you have $$\frac{1}{2n+1}+\frac{1}{2n+3}+\cdots+\frac1{4n+1}$$ (odd denominators) which equals $$\frac{1}{2n+1}+\frac{1}{2n+2}+\cdots+\frac1{4n+1}$$ (all denominators) minus $$\frac1{2n+2}+\frac1{2n+4}+\cdots+\frac1{4n}$$ (even denominators).