Counting inversions is the topic of the problem in this note.

sequences.pdf