(solved by Ambroise Marigot). For which integers $k$ does there exist a function $f: \mathbb{N} \rightarrow \mathbb{Z}$ satisfying $f(2006)=2007$ and:

$$
f(x y)=f(x)+f(y)+k f(\operatorname{GCD}(x, y))
$$

for all integers $x$ and $y$?
First, by setting $x=y$ in the second equation, we obtain $f\left(x^{2}\right)=$ $(k+2) f(x)$. Applying this equality twice, we have

$$
f\left(x^{4}\right)=(k+2)^{2} f(x) .
$$

On the other hand,

$$
\begin{aligned}
f\left(x^{4}\right) & =f(x)+f\left(x^{3}\right)+k f(x)=(k+1) f(x)+f\left(x^{3}\right) \\
& =(k+1) f(x)+f(x)+f\left(x^{2}\right)+k f(x)=(2 k+2) f(x)+f\left(x^{2}\right) \\
& =(3 k+4) f(x) .
\end{aligned}
$$

Applying the two previous equalities to $x=2006$, so that $f(x) \neq 0$, we deduce that $(k+2)^{2}=3 k+4$. Solving this quadratic equation shows that necessarily, $k=0$ or $k=-1$. Conversely, for $k=0$, a solution $f$ is given by $f\left(p_{1}^{\alpha_{1}} \cdots p_{n}^{\alpha_{n}}\right)=\alpha_{1} g\left(p_{1}\right)+$ $\cdots \alpha_{n} g\left(p_{n}\right)$ where $g(2)=2007$ and $g(p)=0$ for all prime numbers $p \neq 2$. The function $\left.f: p_{1}^{\alpha_{1}} \cdots p_{n}^{\alpha_{n}}\right) \mapsto$ $g\left(p_{1}\right)+\cdots+g\left(p_{n}\right)$ works.