Maybe some sort of strange hash function? It looks like it spreads the values fairly evenly from 0-23, while keeping nearby numbers separate. Here's what it looks like from 0-5:
http://www.wolframalpha.com/input/?i=plot+%28%28%28%28x+mod+...
If the input is only integers, the same pattern still appears:
http://www.wolframalpha.com/input/?i=plot+%28%28%28%28floor%...