Okay, now I really need real help, maybe the task is not too heavy but I do not know the easy way to solve this. Let´s start with the problem, now.
Suppose that we have some function $f: \mathbb N \to \mathbb N$ which satisfies this functional identity:
$f(a*b)=f(f(a)*f(b))$
To see that functions with such an identity exist I have constructed the following function which takes values depending on whether the input is odd or even number and it is easily obtained that it satisfies above stated functional equation:
$f(a)=\begin{cases}2 & \text{if $a=2k$}\\ 1&\text{if $a=2k-1$}\end{cases}$
Now, my question is:
Does ($f(a*b)=f(f(a)*f(b))\implies Im(f)$ has only finite number of elements?) (if we exclude the trivial case of the identity function $f(a)=a$)
(Thank you Dejan for observing that there is a trivial counterexample, the identity function, now excluded in this edited version of the question.)
In other words, do all the functions that satisfy above functional equation have as their range (or image set) a set with only finite number of values?
Can we somehow prove this?
Assuming $*$ is multiplication, the answer is negative. For example let $f$ be defined by $f(x)=x$. In this case, $\operatorname{Im}f$ has infinitely many elements and the functional identity holds.
Here's a non-trivial example.
To each $n\in\mathbb N$ assign the set $$P(n)=\{p\in\mathbb N|\;p\text{ is prime and } n \text{ is divisible by } p\}$$ Now define the function $f$ by $$f(n)=\prod_{p\in P(n)}p$$ i.e. $f(n)$ is the product of all primes that divide $n$.
For example: $$f(540) = f(2^2\cdot 3^3\cdot 5) = 2\cdot 3\cdot 5 = 30.$$
Now, $\operatorname{Im}f$ is infinite, since it (among other things) contains all primes. Furthermore $f(f(a)f(b))$ is the product of all primes that appear in the product of the product of all primes in $a$ and the product of all primes in $b$. This is precisely the product of all primes that appear in $ab$ which means that $f(f(a)f(b))=f(ab)$.