Find all possible values of $f(2018)$ Find all possible values of $f(2018)$ where $f$ is a function from $\mathbb{Q}$ to $\mathbb{R_+}$ satisfying the
following three conditions:
$f(2) = \frac{1}{2}$;
for any rational $x$ if $f(x) ⩽ 1$, then $f(x + 1) ⩽ 1$;
$f(xy) = f(x)f(y)$ for all rationals x and y.
I'm not quite sure how to tackle this sort of problem. Since $f(2018) = \frac{f(1009)}{2} \leq \frac{1}{2}$, and $1009$ is prime, does this mean all values below half are possible? How do I solve this type of problem?
 A: $f$ can only be the 2-adic valuation on $\mathbb{Q}$. That is, $f(0) = 0$ (a simple deduction from $f(0 \times 2) = f(0) f (2)$), and if $q = \pm 2^k \frac{a}{b}$ with $a$ and $b$ both odd, then $f(q) = 2^{-k}$. This means that $f(2018) = \frac{1}{2}$.
A few simple deductions to start:

*

*$\frac{1}{2} = f(2) = f(1) f(2) = \frac{f(1)}{2}$, so $f(1) = 1$.


*$1 = f(1) = f((-1)^2) = f(-1)^2$, and $f$ has nonnegative range, so $f(-1) = 1$.


*$f(-x) = f(-1) f(x) = f(x)$ for all $x$.


*$f(n) \leq 1$ for all integers $n$ (proof: we have it for $n = 0, 1, 2$, and the case $|n| \geq 3$ follows from $f(x) \leq 1 \implies f(x+1) \leq 1$ and the evenness of $f$).


*If $0 < x < y$, $f(y) \leq 1$, and $y - x$ is an integer, then $f(x) \leq 1$. (Proof: $f(-y) = f(y) \leq 1$, so $f(-y + (y-x)) = f(-x) \leq 1$, so $f(x) \leq 1$.)
Now let $p \neq 2$ be an odd prime. For any sufficiently large integer $n$, we have $f \left( \frac{2^n}{p} \right) = \frac{1}{2^n f(p)} < 1.$ Furthermore, $2^n \equiv 1 \bmod p$ if $n$ is a multiple of $p-1$ by Fermat's little theorem. So there's some integer $n$ such that $f\left(\frac{2^n}{p}\right) \leq 1$ and $\frac{2^n}{p} - \frac{1}{p}$ is an integer, proving $f\left( \frac{1}{p} \right) \leq 1$. As $f(p) \leq 1$ and $f\left( \frac{1}{p} \right) f(p) = 1$, so $f(p) = 1$. The result that $f$ must be the 2-adic valuation follows immediately from the multiplicativity of $f$.
