Change of variables in a sum If we have the following function $$f(k) = \frac{1}{k-m} \sum_{j=k+1}^{m+n} \frac{1}{j-m}\ \text{where}\ k\in \{m,.....,m+n-1\}$$ How will the function look if we change the variables $i= j-m$ and $r=k-m$?
I have tried to resolve but still having trouble with the final result.
First, since $j\in \{k+1,...m+n \}$ and $i = j-m$ it results that $$ \sum_{j=k+1}^{m+n} \frac{1}{j-m} =  \sum_{i=k+1-m}^{n} \frac{1}{i}\  ?$$
Do we have now that $$f(k) = \frac{1}{k-m} \sum_{i=k+1-m}^{n} \frac{1}{i}\ \ ?$$
Also if next we have $r = k-m$ how will the sum change?
$k\in \{m,.....,m+n-1\} => r\in \{0,.....n-1\}$...
Any help is much appreciated, thanks.
 A: Given that
$$f(k) = \frac{1}{k-m} \sum_{j=k+1}^{m+n} \frac{1}{j-m}, $$
where
$$  k \in \{m,.....,m+n-1\}, $$
and given that
$$
 i= j-m 
$$
and
$$
 r=k-m, 
$$
we obtain
$$
j = i+m
$$
and
$$
k = r+m,
$$
with
$$
r \in \{ 0,  \ldots, n-1 \}, 
$$
and hence
$$
f(k) = f(r+m) = \frac{1}{r} \sum_{i = k+1-m}^{n} \frac{1}{i} = \frac{1}{r} \sum_{i=r+1}^n \frac{1}{i}, 
$$
that is,
$$
f(r+m) = \frac{1}{r} \sum_{i=r+1}^n \frac{1}{i},
$$
which implies that
$$
f(r) = f \big((r-m)+m\big) = \frac{1}{r-m} \sum_{i=r-m+1}^n \frac{1}{i} = \frac{1}{r-m} \sum_{i = r-m+1}^n \frac{1}{i}.
$$
A: Your last sum is
$$f(k)=\frac{1}{k-m}\sum_{i=k-m+1}^n\frac 1i$$
with $ r=k-m$, it becomes
$$\displaystyle{f(k)=\frac{1}{r}\sum_{i=r+1}^n\frac 1i}$$
A: Since the $j$ is the summation index, so this should be transformed
You rightly get:
$$S=\frac{1}{k-m} \sum_{i=k+1-m}^{n} \frac{1}{i}=\frac{1}{k-m}\left( \sum_{j=1}^{n} \frac{1}{i}- \sum_{i=1}^{k+1-m} \frac{1}{i} \right)=\frac{H_{n}-H_{k+1-m}}{k-m}.$$
where $H_n=1+1/2+1/3+1/4+...+1/n% are called Harmonic numbers, you may see
https://en.wikipedia.org/wiki/Harmonic_number
