How find this function $f(x)\equiv 0,x\in R$? 
Let $f:\mathbb R \to \mathbb R$ have the properties
(1): for any prime number $p$ and any real number $x$,
  $$\sum_{j=0}^{p-1}f\left(x+\dfrac{j}{p}\right)=0$$
(2): there exist real numbers $a$ and $b(>a)$ such that: $x\in (a,b) \implies f(x)=0$

Show that $f(x)\equiv 0$
Perhaps we can use this well known fact: 
$$1+a+a^2+\cdots+a^{n-1}=0,a=\exp \left (\dfrac{k\pi\cdot i}{n}\right )$$
but I don't know how to use it here.
 A: Denote by $p_k$ the $k$-th prime. Fix an integer $r\geq 1$. Let $P=p_1p_2p_3 \ldots p_r$ and $g(x)=f(\frac{x}{P})$. Then
$g$ satisfies :
$$
\sum_{j=0}^{p_k-1} g\left(y+j\prod_{l\neq k}p_l\right)=0 \tag{1}
$$
for any $k\in [1,r]$ and $y\in{\mathbb R}$. For $P\in{\mathbb Q}[X]$, $P=\sum_{k=0}^d a_kX^k$, define
$$
\psi(P)=\sum_{k=0}^d a_k g(y+k) \tag{2}
$$
Then $\psi$ is a ring homomorphism, and (1) tell us that the polynomial
$Q_k=\sum_{j=0}^{p_k-1} X^{j\prod_{l\neq k}p_l}$ is in ${\sf Ker}(\psi)$. Now
$Q_k=\Phi_{p_k}(X^{\prod_{l\neq k}p_l})$, so that $z\in{\mathbb C}$ is a root of
$Q_k$ iff  $z^{\frac{P}{p_k}}$ is a primtive $p_k$-th root of unity.
It follows that $z$ is a common root of all the $Q_k (1\leq k \leq r)$ iff $z$ is a primitive
$P$-th root of unity. The gcd of the $Q_k (1\leq k \leq r)$ is therefore
$\Phi_{P}$. But since  ${\sf Ker}(\psi)$ is an ideal of $P\in{\mathbb Q}[X]$, we have
$\Phi_P \in {\sf Ker}(\psi)$. We know that the degree of $\Phi_P$ is exactly
$\phi(P)=\prod_{k=1}^r (p_k-1)=d_k$, so we can write $\phi_P=X^{d_k}+
\sum_{i=0}^{d_k-1} a_i X^i$
where the $a_i$ are integers. We then have :
$$
g(y+d_k)=\sum_{i=0}^{d_k-1}a_ig(y+i) \tag{3}
$$
for any $y\in{\mathbb R}$. Iterating (3), we see that if $g$ is zero on an 
interval of length $\geq d_k$ then it must be zero everywhere.
We deduce that if $f$ iz zero on an interval of length $\geq \frac{d_k}{P}=e_k$
then it must be zero everywhere. But
$$
e_k=\prod_{k=1}^r \left(1-\frac{1}{p_k}\right) \tag{4}
$$
tends to zero when $r\to\infty$ (by 
Euler’s product formula for example), so we are done.
