---
tag: C87X3ACS76
kind: definition
name: Ramanujan summation
msc: ["40G99", "11B68"]
defines: E3SRYCE5VN
uses: [8X25Q4XYMN, 0BE3QDH73A, 0RAS24E1R5]
sources:
  - url: https://en.wikipedia.org/wiki/Ramanujan_summation
---

## Definition

Let $f$ be a [[smooth function|0BE3QDH73A]] on an open interval that contains $[0, \infty)$, and let $B_{2k}$ be the [[Bernoulli numbers|0RAS24E1R5]], with $B_2 = \frac16$.
Assume that the series $\sum_{k \ge 1} \frac{B_{2k}}{(2k)!} f^{(2k-1)}(0)$ converges.
The *Ramanujan sum* of the series $\sum_{n \ge 1} f(n)$ is
$$\sum_{n \ge 1}^{\mathcal{R}} f(n) = -\frac{f(0)}{2} - \sum_{k \ge 1} \frac{B_{2k}}{(2k)!} f^{(2k-1)}(0).$$

## Remarks

If $f$ is a polynomial, only finitely many derivatives are nonzero and the series in the definition is a finite sum.

Example: for $f(x) = x$, one has $f(0) = 0$, $f'(0) = 1$ and all higher derivatives vanish.
So the Ramanujan sum of $1 + 2 + 3 + \cdots$ is $-\frac{B_2}{2} = -\frac{1}{12}$.
For $f(x) = 1$, the Ramanujan sum of $1 + 1 + 1 + \cdots$ is $-\frac12$.

Not a regular method: for $f(x) = e^{-x}$ the series $\sum_{n \ge 1} e^{-n}$ converges to $\frac{1}{e - 1}$.
From $\frac{t}{e^t - 1} = 1 - \frac{t}{2} + \sum_{k \ge 1} \frac{B_{2k}}{(2k)!} t^{2k}$ at $t = 1$ one gets $\sum_{k \ge 1} \frac{B_{2k}}{(2k)!} = \frac{1}{e-1} - \frac12$.
Since $f^{(2k-1)}(0) = -1$, the Ramanujan sum is $-\frac12 + \frac{1}{e-1} - \frac12 = \frac{1}{e-1} - 1$.
It differs from the ordinary sum by $\int_0^\infty e^{-x} \, dx = 1$.

Not stable: for $g(x) = f(x + 1)$ with $f = 1$, the Ramanujan sum of $\sum g(n)$ is $-\frac12$, not $-\frac12 - f(1) = -\frac32$.
