I encountered a question with some of the text given below, My question is, when we enter "$5$" in the function which gives "$0$", which lies outside the given Co-domain. Please anybody guide me on this. Also, the final goal is to eventually determine whether the Function is one-one/onto. I believe maybe the question has an error in itself. (Sorry for any error in typing)
The function $f:\Bbb{N}\to \Bbb{N}$ , where $\Bbb{N}$ denotes the Natural Numbers and $\lfloor\cdot\rfloor$ is the Greatest Integer Function, $$f(x) = x-5\lfloor\frac{x}{5}\rfloor$$
It depends on the convention your book follows. Some authors include $0\in\Bbb{N}$. Others prefer that natural numbers start from $1$.
That being said,
Hint: Can you see that $f(0)=f(5)=f(10)=0$ . Can you say something about injectivity now? Also can you see that you will never end up with $f(n)=6$ for some natural number $n$. What does that tell you about onto-ness? . More explicitly $0\leq f(x)< 5\,,\forall x\in\Bbb{R} $ .
Nevertheless, try and use your skills in modular arithmetic to find out the images of the natural numbers of the form $\{5n,5n+1,5n+2,5n+3,5n+4\}$ and you will exhaust all the cases. Thus conclude.