Let $f:[0,n]\to \Bbb R$ be continuous with $f(0)=f(n)$. Then there are $n$ pairs of numbers $x,y$ such that $f(x)=f(y)$ and $y-x\in\Bbb N$. 
Theorem. Let $f:[0,n]\to \Bbb R$ be continuous with $f(0)=f(n)$ ($n\in\Bbb N$). Then there exist (at least) $n$ distinct pairs of numbers $x,y$ which satisfy $f(x)=f(y)$ and $y-x\in \mathbb{N}$ (where $0$ is not a natural number).

Partial results (see the two answers below):
Proposition. For $f$ as in the Theorem there exists a $x\in[0,n]$ such that $f(x)=f(x+1)$.
Proof. Define $g(x)=f(x+1)-f(x)$ where $x\in[0,n-1]$. Note that $\sum_{i=0}^{n-1}g(i)=f(n)-f(0)=0$. If all $g(i)=0$ then the proposition holds trivially. Otherwise there must be $i\neq j$ such that $g(i)$ and $g(j)$ have different sign. The proposition now follows from the Intermediate Value Theorem.
Proposition. The Theorem holds under the additional assumption that $f$ is concave or convex.
Proof. See the answer by @Maximilian Janisch.
*Remark.*It is not for each $0<m\leq n$, there must exist $x$ s.t. $f(x)=f(x+m)$. For example, if $f_{[0,1]}(x)>0 \wedge f_{[n-1,n]}(x)<0$, then there doesn't exist $x$ s.t. $f(x)=f(x+n-1)$. However,for some $m$, it may have more than one $x$ satisfying $f(x)=f(x+m)$.
 A: Really a long comment: Define $g_k(x)=f(x+k)-f(x)$.  We observe that $g_k$ is continuous since $f$ is continuous.  Proof (somewhat) by induction on $n$.


*

*When $n=1$, the result is trivial.

*When $n=2$, consider $g_1(0)$ and $g_1(1)$.  $g_1(1)=f(2)-f(1)=f(0)-f(1)=-g_1(0)$.  Therefore, $g_1$ must either be identically zero or change signs.  If $g_1$ is identically zero, then $f$ is constant, and, in particular, $f(1)=f(0)$, so $(0,1)$ and $(1,2)$ forms pairs of distance $1$.

*When $n=3$, consider $g_2(0)$ and $g_2(1)$.  $g_2(0)=f(2)-f(0)=f(2)-f(3)=-g_1(2)$.  In addition, $g_2(1)=f(3)-f(1)=f(0)-f(1)=-g_1(0)$.  If $g_2$ does not change signs, then both $g_2(0)$ and $g_2(1)$ have the same sign.  This means that $g_1(0)$ and $g_1(2)$ have the same sign.  
We note that since $f(3)=f(0)+g_1(0)+g_1(1)+g_1(2)$, it follows that $g_1(0)+g_1(1)+g_1(2)=0$, so either all $g_1(i)$'s are zero or $g_1$ changes sign at least once.  Since $g_1(0)$ and $g_1(2)$ have the same sign, then we know that $g_1(1)$ has the opposite sign and the sign of $g_1$ changes at least twice, giving two pairs of points at distance $1$.

*Note also, that if there is a pair of distance $n-1$, then we can use induction to prove the result.
Perhaps the $n=3$ case can be further generalized.
A: EDIT: The general case has been proven by me here.
Answer for a very special case:
Proposition. Let $f:[0,n]\to\Bbb R$ be a continuous function such that 


*

*$f(0)=f(n)$ and 

*$f$ is convex or concave.


Then there are $n$ pairs $(x,y)$ such that $y-x\in\Bbb N$ and $f(x)=f(y)$.
Proof.
By induction (over $n$):
Start ($n=1$): Trivial.
Step: Suppose that the lemma is true for some $n$. Let $f$ be a function as in the lemma for $n+1$. Define $g(x):= f(x+n)-f(x)$ for $x\in[0,1]$.
If $f$ is convex, then we have $f\big(0\cdot(1-t)+(n+1)\cdot t\big)\le (1-t)\cdot f(0)+t\cdot f(n+1)=f(0)$ for all $t\in[0,1]$.
So $f(x)\le f(0)$ for all $x\in[0,n]$. Hence $g(0)=f(n)-f(0)\le 0$ and $g(1)=f(n+1)-f(1)=f(0)-f(1)\geq 0$. It follows from the Intermediate Value Theorem ($g$ is continuous) that $g(x_0)=0$ i.e. $f(x_0+n)=f(x_0)$ for some $x_0\in[0,1]$. Now we can conclude using the inductive hypothesis on $f|_{[x_0,x_0+n]}$ (the latter being a translation of a function that satisfies all assumptions of the Proposition.)
If $f$ is concave then we have $f(x)\geq f(0)$ for all $x$ and we continue as above.
A: Here is a full proof. For $i=1,\dots, n$ and $x\in [0,n-i]$ define $g_i(x):= f(x+i)-f(x)$. Then all the $g_i$ satisfy (on their respective domains):
\begin{gather}
\tag 1 \label 1
\sum_{j=0}^n g_1(j)=0,\\
\tag 2 \label 2
g_i(x)=g_1(x+i-1)+g_1(x+i-2)+\dots+g_1(x)=\sum_{j=0}^{i-1}g_1(x+j).
\end{gather}
Define for all $i=1,\dots,n$ and $j=1,\dots, n-i+1$: 
$$a_{i,j} = g_i(j-1).$$

By the Proposition proven by me here, there are at least $n$ distinct pairs $(i,j)$ with $i\in\{1,\dots, n\}$ and $j\in\{1,\dots,n-i+1\}$ such that
  
  
*
  
*$a_{i,j}=0$ or
  
*$j\le n-i$ and $a_{i,j}\cdot a_{i,j+1} < 0$.
  

In the first case, we have $g_i(j-1)=f(j-1+i)-f(j-1)=0$ leading to a pair $(x,y)$ as wanted.
In the second case, we have $g_i(j-1)\cdot g_i(j)<0$. We can apply the Intermediate Value Theorem to get that there exists and $x\in[j-1,j]$ such that $g_i(x)=f(x+i)-f(x)=0$. This also leads to a pair $(x,y)$ as wanted.
Since all the $(x,y)$ gotten by the above procedure are different for different $(i,j)$, we conclude that there are at least $n$ distinct pairs $(x,y)$ such that $f(x)=f(y)$ and $y-x\in\Bbb N$.
A: I thought it would be nice to present a direct proof, so pardon me for answering an old question.
First extend $f$ periodically, then for $1\le j<n$, define $g_j(x)=f(x)-f(x+j)$. Notice $g_j$ is $n$-periodic because $f$ is. I will show each $g_j$ has at least 2 roots in $[0,n)$.
First suppose $g_j$ has no roots. Since $g_j$ is continuous, it must be either positive or negative. If it is positive, by periodicity, there is some $c>0$ such that $g_j(x)\ge c$ for all $x$. Then $$(n-1)c \le \sum_{l=1}^{n-1} g_j(x+lj) = f(x) - f(x+nj) = 0,$$ because $f$ is $n$-periodic. This gives a contradiction. Hence, $g_j$ must have one root, call it $x_0$, so all $x_0 + n\mathbb{Z}$ are roots of $g_j$. The case $g_j$ negative is similar.
Next, suppose for contradiction that $g_j$ has only one root in $[0,n)$. Then $g_j$ must be nonnegative or nonpositive by periodicity. Say $g_j$ is nonnegative. By assumption, all roots of $g_j$ are $x_0 + n\mathbb{Z}$, then $$ 0 < \sum_{l=1}^{n-1} g_j(x_0+1/2+lj) = f(x+1/2) - f(x+1/2+nj) = 0,$$ a contradiction.
Finally, notice each root $t$ of $g_j$ gives a pair of points $(t\mod n,\ t+j\mod n)$ satisfying the requirement, and the distance between them is either $j$ or $n-j$. For $1\le j < n/2$, the 2 roots of $g_j$ give distinct pairs. If $n$ is even, we also need 1 root of $g_{n/2}$. These in total give $n-1$ distinct pair of points. Adding $(0,n)$ completes the question.
