Problem

Source: New Zealand NZMOC Camp Selection Problems 2013 p5

Tags: function, functional, algebra, functional equation



Consider functions $f$ from the whole numbers (non-negative integers) to the whole numbers that have the following properties: $\bullet$ For all $x$ and $y$, $f(xy) = f(x)f(y)$, $\bullet$ $f(30) = 1$, and $\bullet$ for any $n$ whose last digit is $7$, $f(n) = 1$. Obviously, the function whose value at $n$ is $ 1$ for all $n$ is one such function. Are there any others? If not, why not, and if so, what are they?