If $f$ is continuous and bounded, and $\text{span}\{x \mapsto f(x+k) \mid k \in \Bbb Z\}$ is finite-dimensional, what can we say about $f$? 
If $f : \Bbb R \to \Bbb R$ is continuous and bounded, and $\text{span}\{x \mapsto f(x+k) \mid k \in \Bbb Z\}$ is finite-dimensional, what can we say about $f$?

I found this problem difficult (I found examples of functions for which the hypothesis is true like $n$-periodic functions, where $n \in \Bbb N^*$, but I am struggling for the reverse implication). Can someone help me solve it and does someone have a reference from where it comes?
 A: Answer for the revised question  Now you translate only by integers.  This is called a "homogeneous linear difference equation with constant coefficients".
$$
0 = \sum_{k=K_1}^{K_2} a_k f(x+k), \quad a_{K_1}\ne 0, a_{K_2}\ne 0
$$
The solution (on the integers) is well-known.  These solutions are functions
$$
f(x) = \sum_{n=1}^N C_n(x) \;r_n^x
\tag1$$
where $C_n$ are polynomials, and $r_n$ are complex.  Such a solution is bounded (on $\mathbb Z$, positive and negative) only if the polynomials $C_n$ are constants and $|r_n| = 1$.  If we want real values, we get trigonometric expressions for real and imaginary part of $r_n^x$ when $r_n$ is not real.  Such a function need not be periodic, but (if it is bounded) it is a linear combination of periodic functions.  (Allowing irrational periods!)
For solution on $\mathbb R$, take an arbitrary function on a certain "starting interval" $[a,b] = [0,K_2-K_1]$ and extend
(forward and backward) using the difference equation.  So we get something like $(1)$ except that the constant $C_k$ depends on the value in the starting interval.  We choose our function on the starting interval so that it is continuous, and the values at $a$ and $b$ agree to get a solution that is bounded and continuous.
Previous answer
This is a nice question.  Many generalizations are possible.
For example, what can you say about a (measurable) function $f$ satisfying $$f(x) -2 f(x+1) + f(x+\sqrt{2}\,) = 0\tag1$$  What happens if you add "continuous" or "bounded" or "$L^p$" to the conditions?  What settings other than $\mathbb R$ can be considered?
plug
Edgar, G. A.; Rosenblatt, J. M., Difference equations over locally compact Abelian groups, Trans. Am. Math. Soc. 253, 273-289 (1979). ZBL0417.43006.
A: Claim. If is $f$ is continuous and bounded, then $\,\mathrm{span}\,\{f(x+k): k\in\mathbb Z\}\,$ is a finite dimensional space if and only if $f$ is of the form
$$
f(x)= \exp\big(i\varphi_1 x\big)e_1(x)+\cdots+
\exp\big(i\varphi_k x\big)e_k(x), \tag{$\star$}
$$
where $e_1,\ldots,e_k$ are continuous $1-$periodic functions and $\varphi_1,\ldots,\varphi_k\in [0,2\pi)$, distinct.
The inverse is straight-forward since if we assume that $f$ is of the form $(\star)$, then $f(x),f(x+1),\ldots,f(x+k)$ are linearly dependent.
First, let's study the discrete problem:
If a vector $(a_j)_{j\in\mathbb Z}$ satisfies the recursive relation
$$
a_{j+n}+c_{n-1}a_{j+n-1}+c_{n-2}a_{j+n-2}+\cdots+c_{0}a_{j}=0, \quad j\in\mathbb Z, \tag{1}
$$
where $c_0,\ldots,c_{n-1}$ are given constants (complex in general), then $(a_j)_{j\in\mathbb Z}$ is uniquely expressed in the form
$$
a_j=p_1(j)w_1^j+\cdots+p_k(j)w_k^j,\quad j\in\mathbb Z,
$$
where $w_1,\ldots,w_k$ are the distinct roots of the polynomial
$$
P(x)=x^n+c_{n-1}x^{n-1}+\cdots+c_1x+c_0,
$$
and $p_1,\ldots,p_k$ are polynomials with $\,\deg p_\ell<$ multiplicity of the root $w_\ell$ in the polynomial $P(x)$. If $|w_\ell|>1$ or $0<|w_\ell|<1$, for
some $\ell=1,\ldots,k$, then $(a_j)_{j\in\mathbb Z}$ would not be bounded. Also, if $|w_\ell|=1$ and $\,\deg p_\ell\ge 1$, then again $(a_j)_{j\in\mathbb Z}$
would not be bounded.
Hence, a vector $(a_j)_{j\in\mathbb Z}$ satisfying $(1)$
is bounded if and only if it is of the form
$$
a_j=d_1w_1^j+\cdots+d_k w_k^j,\quad j\in\mathbb Z,
$$
where $d_1,\ldots,d_k$ constants and $|w_1|=\cdots=|w_k|=1$ and of course, the $w_\ell$'s are still distinct roots of $P(x)$.
If  $a_j$'s and $c_k$'s are real, then
$(a_j)_{j\in\mathbb Z}$ should be of the form
$$
a_j=\sum_{\ell=1}^k d_\ell\cos (w_\ell j)+e_\ell\sin (w_\ell j), \quad j\in\mathbb Z.
$$
Back to the continuous problem, assume that $f(x)$ is continuous and bounded and satisfies
$$
f(x+n)+c_{n-1}f(x+n-1)+c_{n-2}f(x+n-2)+\cdots+c_{0}f(x)=0, \quad x\in\mathbb R.
$$
Fixing $x\in \mathbb R$, and setting $a_j(x)=f(x+j)$, we obtain, based on our previous discussion, that
$$
a_j(x)=d_1(x)w_1^j+\cdots+d_k(x) w_k^j=f(x+j),\quad j\in\mathbb Z, \tag{2}
$$
where, the $w_\ell$'s are the distinct roots of the polynomial $P(x)$
and $|w_1|=\cdots=|w_k|=1$.
In $(2)$, if we set $j=1,\ldots,k$, we obtain a $k\times k$ linear system with unknowns $d_1(x), \ldots, d_k(x)$. The matrix of the system is $(w_k^j)_{j,k}$, and it is invertible since it is a Vandermonde matrix. Hence the system possesses a unique solution vector $\big(d_1(x),\ldots,d_k(x)\big)$, with is expressed uniquely as a linear combination of the values of $f(x+1),\ldots,f(x+k)$. Hence the $d_\ell$'s are all continuous functions.
So far we have shown that, is $f$ satisfies the conditions of the question, and $a_j(x)=f(x+j)$, then $a_j(x)$ is expressed as in $(2)$, uniquely (once we know $f$ and the unit roots of $P$), with $d_\ell$'s continuous functions and $w_\ell$ discrete unit complex numbers.
Also
$$
d_1(x+1)w_1^{j}+\cdots+d_k(x+1) w_k^{j}=
a_{j}(x+1)=f(x+j+1) \\ =a_{j+1}(x)=d_1(x)w_1^{j+1}+\cdots+d_k(x) w_k^{j+1} \\=
w_1d_1(x)w_1^{j}+\cdots+w_kd_k(x) w_k^{j}
$$
and hence, due to the uniqueness
$$
d_\ell(x+1)=w_\ell d_\ell(x), \quad x\in\mathbb R,\,\,\,\ell=1,\ldots,k.
$$
Clearly, there exist numbers $\varphi_\ell\in [0,2\pi)$, such that $w_\ell=\exp\big(i\varphi_\ell\big)$. Then the functions
$$
e_\ell(x)=\exp\big(-i\varphi_\ell x\big)d_\ell(x), \quad \ell=1,\ldots,k,
$$
are clearly $1-$periodic.
So, we have shown that $f$ is of the form
$$
f(x)=a_0(x)=d_1(x)+\cdots+d_k(x) \\ = \exp\big(i\varphi_1 x\big)e_1(x)+\cdots+
\exp\big(i\varphi_k x\big)e_k(x),
$$
where $e_\ell(x)$ are continuous $1-$periodic functions and $\varphi_\ell$'s distinct numbers in $[0,2\pi)$.
Note. If we need to restrict ourselves in $\mathbb R$, then $(\star)$ should be of the form
$$
f(x)=\sum_{\ell=1}^k \big(\cos(\varphi_\ell x)C_\ell(x)+
\sin(\varphi_\ell x)S_\ell(x)\big)
$$
where the $C_\ell$'s and $S_\ell$'s are $1-$periodic functions.
