I have a set of scores $s \in[1;40]$, where $s$ is integer. I want to map each score to a index, like this:
$1 \le s \le 5 \to 0 \\ 6 \le s \le 10 \to 1 \\ 11 \le s \le 20 \to2\\ 21 \le s \le 30 \to3\\ 31 \le s \le 40 \to4\\ $
So basically I am looking for a function which would map the score to the index. I have tried with logs and algebraic functions (is that the term?) but since the intervals are not the same (5 for the first, 10 for the second, 10 for the third, &c.) I don't know how to get around this.