The breaks are at 41, 121, 241, 401, 601, etc. So they are pretty far apart.
You can just take the (numbers -1)/40 and round them down. You will get integers from 1 to 50 for levels up to 9. The breaks occur at 1, 3, 6, 10, 15 etc.
You can just loop a counter that goes up by 2, 3, 4, etc.