Data source: http://rosettacode.org/wiki/Permutations/Rank_of_a_permutation
