A limited composition of two unlimited functions on natural numbers?

51 Views Asked by At

Can someone give an example of two functions $f,g:\Bbb N\to \Bbb N$ such that $|\operatorname{Im}f|,|\operatorname{Im}\,g|\notin\Bbb N$, but such that $|\operatorname{Im}\,g\circ f|\in\Bbb N$?

1

There are 1 best solutions below

1
On BEST ANSWER

$$ f(n)=2n+1 $$ $$ g(n) = \begin{cases} 1 \quad \mbox{if $n$ is odd}; \\ n \quad \mbox{if $n$ is even}. \end{cases} $$