Finding non-trivial functions $f(x)$ such that $\sum_{n=1}^{\infty}f(n)=\int_{0}^1f(x)dx$ It is known that Atle Selberg found the following expression when he was 14 years old :
$$\sum_{n=1}^{\infty}n^{-n}=\int_{0}^1x^{-x}dx.$$
Then, here is my question.
Question : Find the other non-trivial functions $f(x)$ such that
$$\sum_{n=1}^{\infty}f(n)=\int_{0}^1f(x)dx.\ \ \ \cdots(\star)$$ 
Motivation : I found the followings:
Let $m$ be a natural number. Let us define a function $f(x)$ for $a\gt0$ as
$$f(x)=\frac1{(x+a)^m}-\frac1{(x+a+1)^m}\ \ \ (x\ge 0).$$
I'm going to prove that for any $m\in\mathbb N$ there exists only one $a\gt 0$ such that $f(x)$ satisfies $(\star)$.
1. The $m=1$ case.
We get
$$\sum_{n=1}^{\infty}f(n)=\sum_{n=1}^{\infty}\left(\frac1{n+a}-\frac1{n+a+1}\right)=\frac1{a+1},$$
$$\int_{0}^1f(x)dx=[\log(x+a)-\log(x+a+1)]_0^1=-\log\left(1-\left(\frac1{a+1}\right)^2\right).$$
Hence, if there exist $0\lt u_0\lt 1$ such that $$u_0=-\log(1-{u_0}^2),$$then $f(x)$ satisfies $(\star)$ when $a=a_0={u_0}^{-1}-1$. 
In fact, we find that there exists only one such $u_0$ by observing 
$$G(u)=-\log(1-u^2)-u\ \ (0\lt u\lt 1).$$
2. The $m\ge 2$ case.
We get 
$$\sum_{n=1}^{\infty}f(n)=\frac1{(a+1)^m},$$
$$\int_{0}^1f(x)dx=\frac1{m-1}\left\{\frac1{a^{m-1}}-\frac2{(a+1)^{m-1}}+\frac1{(a+2)^{m-1}}\right\}.$$
Hence, let's prove that there exist $a\gt0$ such that
$$\frac1{(a+1)^m}=\frac1{m-1}\left\{\frac1{a^{m-1}}-\frac2{(a+1)^{m-1}}+\frac1{(a+2)^{m-1}}\right\}\ \ \ \ \cdots(\star\star)$$
Letting
$$h_m(a)=\frac{(a+1)^m}{a^{m-1}}+\frac{(a+1)^{m}}{(a+2)^{m-1}}-2(a+1)-(m-1),$$
then we know that 
$$(\star\star)\iff h_m(a)=0.$$
However, getting
$$\begin{align}
h_m(a) & = \frac{(a+1)^{m}}{a^{m-1}}+\frac{((a+2)-1)^m}{(a+2)^{m-1}}-2(a+1)-(m-1) \\
 & = \frac1{a^{m-1}}\sum_{k=0}^m\binom{m}{k}a^{m-k}+\frac1{(a+2)^{m-1}}\sum_{k=0}^m\binom{m}{k}(-1)^k(a+2)^{m-k}-2(a+1)-(m-1) \\ 
 & = -(m-1)+\sum_{k=2}^m\binom{m}{k}\left\{\frac1{a^{k-1}}+\frac{(-1)^k}{(a+2)^{k-1}}\right\}
\end{align}$$
tells us
$$\lim_{a\to +0}h_m(a)=+\infty, \lim_{a\to +\infty}h_m(a)=-(m-1)\lt 0,$$
$$h_m^{\prime}(a)=-\sum_{k=2}^m\binom{m}{k}(k-1)\left\{\frac1{a^k}+\frac{(-1)^k}{(a+2)^k}\right\}\lt0.$$
Here, note that 
$$\frac1{a^k}+\frac{(-1)^k}{(a+2)^k}\gt 0.$$
Hence, we know that there exists only one $a\gt 0$ such that $h_m(a)=0.$ Now the proof is completed.
By the way, we know $a=\sqrt2$ for $m=2$.
I've been looking for the other functions, but I cannot find any other function. Can anyone help?
 A: This is more of a comment, but too long to put there.
Keep in mind that the value of a function at isolated points does not affect its integral. So, take any integrable function $f: [0,1\rangle \to \mathbb{R}$, and let $I := \int_0^1 f(x) dx$. Now, expand the deinfition of $f$:
\begin{align*}
f(1) &:= I, \\
f(n) &:= 0, \quad n \in \mathbb{N} \setminus \{1\}, \\
f(x) &:= \text{anything you want}, \quad x \in \mathbb{R} \setminus ([0,1 \rangle \cup \mathbb{N}).
\end{align*}
Even if you want a continuous function, you can still define it by starting from $f: [0,1] \to \mathbb{R}$, and then you set its values outside of $[0,1]$, so that
\begin{align*}
f(2) &:= I - f(1), \\
f(n) &:= 0, \quad n \in \mathbb{N} \setminus \{1\}, \\
f(x) &:= \text{anything you want}, \quad x \in \mathbb{R} \setminus ([0,1 \rangle \cup \mathbb{N}).
\end{align*}
You can always do this (and in a huge number of ways) while preserving the continuity of your function.
A: $$\sum_{n=1}^{\infty}J_0(nx)J_0(ny)J_0(nz)-\int_0^{\infty}J_0(ux)J_0(uy)J_0(uz)du=\frac{1}{2}$$
