New to stackexchange.
Known harmonic numbers are defined as $$ H_n= \sum _ {i = 1}^n\frac {1} {i}$$
Is the series above similar to the general term formula of $ \sum _ {i = 1}^n i= n (n+1)/2$?
New to stackexchange.
Known harmonic numbers are defined as $$ H_n= \sum _ {i = 1}^n\frac {1} {i}$$
Is the series above similar to the general term formula of $ \sum _ {i = 1}^n i= n (n+1)/2$?
The method is the same as for $\sum_{j \le n} j^r$ but the result isn't a polynomial, we only have an asymptotic expansion.
Let $$f(z) = \frac1z - \log(z+1)+\log(z)=\frac1z - \log(1+\frac1{z})=F(\frac1z)$$ $F(s)= s-\log(1+s)$ is analytic for $|s|<1$ and $F(0)=F'(0)=0$. Thus, by induction there are some coefficients $c_k$ such that for all $K$, the first $K+1$ derivatives of $$F_K(s) = \sum_{k=1}^K c_k s^k (1-(\frac1{s+1})^k)$$ agree with that of $F$.
Whence $$\sum_{j> n} f(j)= \sum_{j> n} (F_K(1/j)+O(j^{-K-2}))= \sum_{k=1}^K c_k \sum_{j> n}(\frac1{j^k}-\frac1{(j+1)^k})+O(\sum_{j>n} j^{-K-2})$$ $$ = \sum_{k=1}^K \frac{c_k }{(n+1)^k} + O(n^{-K-1})$$ From which we get $$\sum_{j \le n} \frac1j = \sum_{j\le n} (\log(j+1)-\log(j)) + \sum_j f(j) - \sum_{j> n} f(j)$$ $$ = \log(n+1)+\gamma-\sum_{k=1}^K \frac{c_k}{(n+1)^k} + O(n^{-K-1})$$
The formula for the harmonic number $H_n = \sum_{k=1}^n \frac{1}{k}$ is really elementary in that it is defining.
However, we can find a formula which covers uniformly the cases $\sum_{k=1}^n k$ and $\sum_{k=1}^n \frac{1}{k}$ etc. The formula is simply
$$\sum_{k=1}^n k^{-p}=H_{p}(n)\tag{1}$$
whence $\sum_{k=1}^n k = H_{-1}(n)$ and $\sum_{k=1}^n \frac{1}{k}= H_{1}(n) = H_n.$
In order to understand the meaning of this simple statement we have to go down to some depth.
To begin with, we shall derive an integral formula for $s$, assuming $p>0$, later we will be interested in $p\le 0$ as well.
Writing
$$k^{-p} = \frac{1}{\Gamma(p)} \int_{0}^{\infty} t^{p-1} e^{-t k}\,dt$$
where $\Gamma (p)=\int_0^{\infty } \exp (-t) t^{p-1} \, dt$
and doing the $k$-sum under the integral,
$$\sum_{k=1}^n e^{-k t} = e^{-t} \frac{1-e^{-t n}}{1-e^{-t}}=\frac{1-e^{-t n}}{e^{t}-1}$$ we find the integral formula
$$s_{p}(n) = \frac{1}{\Gamma(p)}\int_0^{\infty} t^{p-1}\frac{1-e^{-n t}}{e^t-1}\,dt\tag{2}$$
Expanding $\frac{1}{\exp (t)-1}=\frac{\exp (-t)}{1-\exp (-t)}=\sum _{m=1}^{\infty } \exp (-m t)$
and integrating we obtain a sum formula
$$s_p(n) = \sum_{m=1}^{\infty}\left(\frac{1}{m^{p}}-\frac{1}{(m+n)^{p}} \right)\tag{3}$$
Checking it for $p=1$ and $n=3$
$$\sum_{m=1}^{\infty}\left(\frac{1}{m}-\frac{1}{m+3} \right)\\ = \frac{1}{1}-\frac{1}{1+3}+\frac{1}{2}-\frac{1}{2+3}+\frac{1}{3}-\frac{1}{3+3} +\frac{1}{4}-\frac{1}{4+3}+... \\=\frac{1}{1}+\frac{1}{2}+\frac{1}{3} $$
All other terms cancel, so that the sum is indeed $H_3$. And this holds for any integer $n\ge0$.
Formulas $(1)$ through $(3)$ are equivalent for $p>0$, i.e for the sum of inverse powers. Notice that $(2)$ and $(3)$ are not restricted to integer $n$ and represent the analytic continuation of $H_n$ to complex $n$.
But what can be said about $p\le0$? Are the formulas still valid?
The sum $(3)$ is obviously diverging, but what about the integral?
The integral $(2)$ diverges at $t\simeq 0$. But wait! The factor $\frac{1}{\Gamma(p)}$ goes to zero for $p\to 0,-1,-2,...$ and hence might cancel the divegence.
Let's have a closer look at $p\to 0$.
We split the integral into $\int_0^{\infty}= \int_0^1 +\int_1^{\infty}$ and observe that the second integral is convergent for any $p$ whence its contribution vanishes for integer $p\le0$ taking into account the gamma factor.
Next we use the Bernoulli polynomials $B_m(n)$ defined by the generating equation (http://mathworld.wolfram.com/BernoulliPolynomial.html, formula (4))
$$\frac{t \;e^{n t}}{e^t-1}=\sum _{m=0}^{\infty } \frac{t^m B_m(n)}{m!}\tag{4}$$
Inserting this expansion into $(2)$ the $t$-integral becomes
$$\int_0^1 \frac{t^{p-2} \left(\frac{B_m(0) t^m}{m!}-\frac{t^m B_m(-n)}{m!}\right)}{\Gamma (p)} \, dt \\=\frac{B_m-B_m(-n)}{(m+p-1)\Gamma (p)m!} $$
This has to be summed over $m$ from $1$ to $\infty$. Notice that the term with $m=0$ cancels out.
The first few summands give
$$s_p(3,n) = \sum _{m=1}^3 \frac{B_m-B_m(-n)}{(m+p-1) \Gamma (p)\;m!}\\= \frac{-n^2-n}{2 (p+1) \Gamma (p)}+\frac{n^3+\frac{3 n^2}{2}+\frac{n}{2}}{6 (p+2) \Gamma (p)}+\frac{n}{p \Gamma (p)}$$
Notice how the poles of the gamma function at $p=0, -1, -2$ are cancelled by the appropriate factors in the denominators.
Now the limits can be taken
$$\lim_{p\to 0} \, s_p(3,n)= n = s_{0}(n)$$
$$\lim_{p\to -1} \, s_p(3,n)= \frac{1}{2} n (n+1) = s_{-1}(n)$$
$$\lim_{p\to -2} \, s_p(3,n)= \frac{1}{6} n \left(2 n^2+3 n+1\right) = s_{-2}(n)$$
And we recover the well-known formulas for sum over the powers of positive integers.
In general, since $\lim_{p\to -m} \, (m+p) \Gamma (p)=(-1)^m$ we have for $q=0,1,2,...$
$$H_{-q}(n) = \frac{(-1)^{q+1} (B_{q+1}(-n)-B_{q+1}(0))}{(q+1)!}\tag{5}$$
Summarizing, we have found with $(2)$ and its analytic continuation a formula which yields the power sums for negative as well as non negative integers powers.
It is known that $$\int_0^1\frac{t^x-1}{t-1}dt=H_x$$Which could be found by noticing that the integrand is a geometric series: $$\int_0^1\sum_{n=0}^xt^n\space dt=\sum_{n=0}^x\left(\frac{t^{x+1}}{x+1}\right)\bigg|_0^1=H_x$$