
Solution 1. We claim that the only possible values of $c$ are $k+\frac{1}{2}$ for some non-negative integer $k$. The fact that these values are possible is seen from the function $f(x)=$ $\left\lfloor\left(k+\frac{1}{2}\right) x\right\rfloor+1=k x+\left\lfloor\frac{x}{2}\right\rfloor+1$. Indeed, if you have any $x, a \in \mathbb{N}$, then

$$
\frac{f(x+a)-f(x)}{a}=\frac{1}{a}\left(k a+\left\lfloor\frac{x+a}{2}\right\rfloor-\left\lfloor\frac{x}{2}\right\rfloor\right)=k+\frac{1}{a}\left(\left\lfloor\frac{x+a}{2}\right\rfloor-\left\lfloor\frac{x}{2}\right\rfloor\right)
$$

This is clearly an integer for $a=1$. But for $a \geq 2$, we have

$$
\left\lfloor\frac{x+a}{2}\right\rfloor-\left\lfloor\frac{x}{2}\right\rfloor \geq\left\lfloor\frac{x+2}{2}\right\rfloor-\left\lfloor\frac{x}{2}\right\rfloor=1
$$

If $a=2 k$, then

$$
\left\lfloor\frac{x+a}{2}\right\rfloor-\left\lfloor\frac{x}{2}\right\rfloor=k0$ is such that $|f(x)-c x| \leq d$. Pick $N>\frac{2 d}{1-2 c}$ so that $2(c N+d)j+1$. Then $\frac{f(i)-f(j)}{i-j}=0$, which contradicts condition (a) for $x=j$ and $a=i-j$.

Now for the general case, suppose $c=k+\lambda$, where $k \in \mathbb{Z}$ and $\lambda \in[0,1)$. Let $d \in \mathbb{N}$ be such that $-d \leq f(x)-c x \leq d$. Consider the functions

$$
g_{1}(x)=f(x)-k x+d+1, g_{2}(x)=x-f(x)+k x+d+1
$$

Note that

$$
\begin{gathered}
g_{1}(x) \geq c x-d-k x+d+1=\lambda x+1 \geq 1 \\
g_{2}(x) \geq x-(c x+d)+k x+d+1=(1-\lambda) x+1 \geq 1
\end{gathered}
$$

so that these are also functions from $\mathbb{N}$ to $\mathbb{N}$. They also satisfy condition (a) for $f$ :

$$
\frac{g_{1}(x+a)-g_{1}(x)}{a}=\frac{f(x+a)-k(x+a)+d-f(x)+k x-d}{a}=\frac{f(x+a)-f(x)}{a}-k
$$

is an integer if and only if $\frac{f(x+a)-f(x)}{a}$ is, which happens if and only if $a=1$. A similar argument holds for $g_{2}$.

Now note that $g_{1}(x)-\lambda x=f(x)-c x+d+1$ is bounded, and so is $g_{2}(x)-(1-\lambda) x=$ $c x-f(x)+d+1$. So they satisfy the weaker form of condition (b) as well. Thus applying the reasoning in the second paragraph, we see that $\lambda \geq \frac{1}{2}$ and $1-\lambda \geq \frac{1}{2}$. This forces $\lambda=\frac{1}{2}$, which finishes our proof.


Problem 3. Let $\mathbb{N}$ denote the set of all positive integers. Find all real numbers $c$ for which there exists a function $f: \mathbb{N} \rightarrow \mathbb{N}$ satisfying:

(a) for any $x, a \in \mathbb{N}$, the quantity $\frac{f(x+a)-f(x)}{a}$ is an integer if and only if $a=1$;

(b) for all $x \in \mathbb{N}$, we have $|f(x)-c x|<2023$.
