Problem: Let $f \colon \QQ \to \QQ$ be a function such that for any $x,y \in \QQ$,
the number $f(x+y)-f(x)-f(y)$ is an integer.
Decide whether there must exist a constant $c$
such that $f(x) - cx$ is an integer for every rational number $x$.

Solution: No, such a constant need not exist.

One possible solution is as follows:
define a sequence by $x_0 = 1$ and
\begin{align*}
  2x_1 &= x_0 \\
  2x_2 &= x_1 + 1 \\
  2x_3 &= x_2 \\
  2x_4 &= x_3 + 1 \\
  2x_5 &= x_4 \\
  2x_6 &= x_5 + 1 \\
  &\vdotswithin=
\end{align*}
Set $f(2^{-k}) = x_k$ and $f(2^k)=2^k$ for $k=0,1,\dots$.
Then, let
\[ f\left( a \cdot 2^k + \frac bc \right)
  = a f\left( 2^k \right) + \frac bc \]
for odd integers $a$, $b$, $c$.
One can verify this works.

A second shorter solution (given by the proposer) is to set,
whenever $\gcd(p,q) = 1$ and $q > 0$,
\[ f\left( \frac pq \right)
  = \frac pq \left( 1! + 2! + \dots + q! \right). \]


\begin{remark*}
  Silly note: despite appearances,
  $f(x) = \left\lfloor x \right\rfloor$
  is not a counterexample since one can take $c = 0$.
\end{remark*}