How may I find all continuous and bounded functions g with the following property? 
Find all continuous and bounded functions $g$
with :
$$\forall x \in \mathbb R, 4g(x)=g(x+1)+g(x-1)+g(x+\pi)+g(x-\pi).$$

I have posted this question here, but received no answer.
 A: (Compare  On equation $f(z+1)-f(z)=f'(z)$.)
Plug $g(x)=e^{\lambda x}$. We obtain the characteristic equation:
$$4=2\cosh \lambda+2\cosh\pi\lambda.$$
This has one real root $\lambda=0$ of multiplicity $2$.
This root gives a solution $g(x)=ax+b$ with arbitrary constants $a$ and $b$. Since you are looking for bounded solutions, one has to set $a=0$ and we recover the constant solution of @katago. However there are infinitely many others: Let $\lambda=p+iq$ be any complex solution (there are
infinitely many of them). Then any linear combination
$$g(x)=\sum c_ke^{\lambda_k x}$$
gives you a solution. In general, this solution is complex,
but if you want a real solution, notice that $\lambda_k$
come in complex conjugate pairs, so you have
an infinte-dimensional space of real solutions. Now solutions bounded on the real line will correspond to
pure imaginary $\lambda$, but the characteristic
equation does not have pure imaginary roots.
So every bounded solution is indeed constant. That all solutions are linear combinations of exponentials or their limits is a general theorem cited in the reference that I gave in the beginning.
A: It seems $g$ can only be a constant function. First, $g$  is constant in any shift of set $f(A_x)=\{x+a+b\pi| a,b\in \mathbb N\}$ by Liouville type theorem for discrete harmonic function, and then we need suitable choose the constant to make the function continuous on $\mathbb R/A_x$. but by Dirichlet approximation theorem we can get $g$ is constant on $\mathbb R$.
A: Iosef's answer shows the only solutions are constants.
Plug …
Edgar, G. A.; Rosenblatt, J. M., Difference equations over locally compact Abelian groups, Trans. Am. Math. Soc. 253, 273-289 (1979). ZBL0417.43006.
At the end, we construct a nontrivial, continuous, bounded, almost-periodic function $F : \mathbb R \to \mathbb C$ satisfying
$$
0 = F(x+1)- F(x-1) -\sqrt{2}F(x+2\pi)+\sqrt{2}F(x-2\pi) .
$$
A: $\newcommand\de\delta$Considering $g$ a distribution (in the generalized-function sense), let $\hat g$ be the Fourier transform of $g$. Then your functional equation yields
$$4\hat g(t)=e^{it}\hat g(t)+e^{-it}\hat g(t)+e^{i\pi t}\hat g(t)+e^{-i\pi t}\hat g(t),$$
or
$$(\cos t+\cos\pi t-2)\hat g(t)=0,$$
for real $t$.
The equality $\cos t+\cos\pi t-2=0$ for real $t$ implies $\cos t=1=\cos\pi t$ and hence $t=0$ (because $\pi$ is irrational). So,
the support of $\hat g$ is $\{0\}$. So (see e.g. "For every compact subset $K\subseteq U$ there exist constants
$C_{K}>0$ and $N_{K}\in \mathbb {N}$ such that for all $f\in C_{c}^{\infty }(U)$ with support contained in $K$ [...]" here), we have $\hat g=\sum_{j=0}^n c_j\de^{(j)}$ for some $n\in\{0,1,\dots\}$ and some complex $c_j$'s, where $\de^{(j)}$ is the $j$th derivative of the delta function. So, $g$ is a polynomial. Since $g$ is bounded, it is constant. $\quad\Box$
