The Cabinet of Curios

Lehmer codes

A Lehmer code writes any order of n things as n small numbers. Each number answers one question: of the things not placed yet, which one comes next? Shuffle the cards, then play the animation to turn the shuffle into a code. Switch direction to turn the code back into the shuffle.

Items
Using
Shuffle Β· tap two cards to swap them
Lehmer code Β· tap a digit to change it

Rank among all orders

Digit sum = pairs out of order

Every order

Things to notice