Continuous or analytic functions with this property of sinc function This question is motivated by my previous post in SE (math.stackexchange.com).
Prove or disprove that $\frac{\sin x}{x}$ is the only nonzero entire (i.e. analytic everywhere), or continuous,
function, $f(x)$ on $\mathbb{R}$ such that $$\int_{-\infty}^\infty f(x) dx=\int_{-\infty}^\infty f(x)^2 dx=\sum_{-\infty}^\infty f(n) =\sum_{-\infty}^\infty f(n)^2 $$
 A: Seems like the Poisson formula is well-forgotten nowdays. Assume that $f$ is a real valued even Schwartz function and pass to its Fourier transform $g$ (with $2\pi$ in the exponent). Then the conditions are $$g(0)=\int_{\mathbb R} g^2=\sum_{k\in\mathbb Z} g(k)=\int_{[-1/2, 1/2]}G^2$$ where $G(x)=\sum_{k\in\mathbb Z} g(x+k)$ is the $1$-periodization of $g$. Not to bother about $1$-periodization too much, assume that $g$ is supported on $[-0.3,0.3]$ (that'll take care of analyticity of $f$ too). Then we just need a smooth real-valued even function on that interval whose value at $0$ equals the integral of its square. They are plenty.
This would be a nice question for an analysis qualifier exam. :) I'll try to propose it for the next one and see if it flies.
A: Consider the function $f:\mathbb R\to\mathbb R$ which vanishes outside of $[-1,1]$ and such that for all $x \in [-1,1]$ has $$
f(x) = \frac{5 x^4}{4}+\frac{1}{2}
   \sqrt{\frac{37}{6}} x^3-\frac{9
   x^2}{4}-\frac{1}{2} \sqrt{\frac{37}{6}}
   x+1.
$$
Then $$\int_\mathbb Rf(x)\,\mathrm dx=\int_\mathbb Rf(x)^2\,\mathrm dx=\sum_{n\in\mathbb Z}f(n)=\sum_{n\in\mathbb Z}f(n)^2=1.$$
Moreover, the functions with the same support which on $[-1,1]$ coincide with the polynomials $$
\begin{array}{l}
 -\frac{1}{32} (x-1)^2 (x+1) \left(x
   \left(\left(11+\sqrt{3245}\right)
   x+\sqrt{3245}-29\right)-32\right); \\\\
 \frac{(x-1)^3 (x+1) \left(x \left(7
   \left(\sqrt{2657109}-923\right) x+5
   \sqrt{2657109}-8431\right)-3392\right)}
   {3392}; \\\\
 -\frac{1}{64} (x-1)^4 (x+1) \left(\left(3
   \sqrt{3855}-175\right) x^2+2
   \left(\sqrt{3855}-98\right) x-64\right);
   \\\\
 \frac{(x-1)^5 (x+1) \left(3
   \left(\sqrt{3040433}-2550\right) x^2+2
   \left(\sqrt{3040433}-4571\right)
   x-3008\right)}{3008}; \\\\
 -\frac{(x-1)^6 (x+1) \left(x \left(25
   \left(3 \sqrt{622687}-6365\right) x+51
   \sqrt{622687}-202885\right)-67328\right
   )}{67328};
\end{array}
$$ have the same properties and are $C^1$, $C^2$, $C^3$, $\dots$, respectively, and it seems one can go on indefinitely. There are no other polynomials satisfying the conditions and of degree less than or equal to theirs. The unique $C^k$ polynomial of degree $4+k$ satisfying the conditions is the product of $(x-1)^{k+1}(x+1)$ and a degree $2$ factor: one should be able to describe this last factor explicitly somehow...
A: Perhaps the most simple example of an analytic function $f$, other than $0$, satisfying all three equalities is $f(x) = \sin(\pi x)/ (\pi x)$. This is verified immediately by a change of variable $x'=\pi x$, giving $\int_{ - \infty }^\infty  {f(x)\,{\rm d}x}  = \int_{ - \infty }^\infty  {f^2 (x)\,{\rm d}x}  = 1 = \sum\nolimits_n {f(n)}  = \sum\nolimits_n {f^2 (n)}$. 
EDIT: TCL provided a (very interesting) generalization.
A: Let me try to expand Petya comment in an explicit case, hoping that this can be useful.
Take $K >>0$ and consider the set of functions 
$f_k:=e^{-kx^2}, \quad k=1,2, \ldots, K$.
Assume that we want to find an analytic function $f$ satisfying the requirement of the question and which is a linear combination of the $f_k$, namely
$f=\sum_{k=1}^K a_kf_k, \quad a_k \in \mathbb{R}$.
Then we must solve the following system of equations
$\sum_{k=1}^k A_ka_k =\sum_{i,j=1}^K A_{ij} a_ia_j$
$\sum_{k=1}^k B_ka_k =\sum_{i,j=1}^K A_{ij} a_ia_j$
$\sum_{k=1}^k B_ka_k =\sum_{i,j=1}^K B_{ij} a_ia_j$,
where
$A_k:=\int_{\mathbb{R}} f_k, \quad A_{ij}:=\int_{\mathbb{R}} f_i \cdot f_j$,
$B_k:=\sum_{n \in \mathbb{Z}} f_k(n), \quad B_{ij}:=\sum_{n \in \mathbb{Z}} f_i(n) \cdot f_j (n)$.
This system of equations geometrically describes the intersection of three non-empty quadrics hypersurfaces in $\mathbb{R}^K$, so one expects infinite solutions for $K$ big enough.  
A: Here's a simple example of a smooth (rather than analytic) function $f$ satisfying the conditions. 
Define $f(x) = \exp [ - ax^2 /(1 - x^2 ) + bx]$ if $x \in (-1,1)$, and $f(x)=0$ otherwise. Here $a$ and $b$ are certain positive constants, to be evaluated below. That the function $f$ is smooth (i.e. infinitely differentiable) should be clear by comparison with the function $\exp(-1/x^2)$ (where the point $0$ corresponds to the points $\pm 1$). Now, since $f(0)=1$ and $f(n)=0$ for any integer $n \neq 0$, it remains to have $\int_{ - 1}^1 {f(x)\,{\rm d}x}  = \int_{ - 1}^1 {f^2 (x)\,{\rm d}x}  = 1$. Comparing the logs of $f$ and $f^2$, it is not surprising that there indeed exist $a$ and $b$ satisfying the two integral conditions. With some effort, one is likely to be able to prove this rigorously. However, for our purposes it is enough to be convinced by numerical results. Well, it is easy to get close to a solution. For example, letting $a=3.25247$ and $b=2.08761361$ gives $\int_{ - 1}^1 {f(x)\,{\rm d}x} \approx 0.999999999149$, $\int_{ - 1}^1 {f^2 (x)\,{\rm d}x} \approx 1.000000136$. 
A: In fact, the identity is true for the function $f(x)=\frac{\sin ax}{ax}$ for each
$0\lt a\le \pi$.
For the integral part, just apply substitution.
For the series part, use the fact that $\sum_{n=1}^\infty \frac{\sin nx}{n}=\frac{\pi-x}{2}$ for $0\lt x\lt 2\pi$,
and that $\sum_{n=1}^\infty \frac{\sin^2 nx}{n^2}=\frac{\pi^2}{8}-\frac{1}{2}\left(x-\frac{\pi}{2}\right)^2$ for
$0\lt x\le \pi$.
Thus $$\int_{-\infty}^\infty f(x) dx=\int_{-\infty}^\infty (f(x))^2 dx=\sum_{n=-\infty}^\infty f(n)=\sum_{n=-\infty}^\infty f(n)^2=\frac{\pi}{a}.$$
A: There is the characterization from 
http://www.math.caltech.edu/SimonPapers/324.pdf
or the work of Lubinsky. Of course the conditions are slightly different then yours.
I am not sure of the meaning of requiring something at the integer points, but it seems to me that you miss an essential requirement on the growth.
