Minecraft wiki entry for Experience_farming, associated text: Enchanting max: To get from level 0 to level 30 requires 1395 experience.
Anvil max: To get from level 0 to level 39 requires 2727 experience.
Recovering after a max-power enchantment: to get from level 27 to level 30 requires 306 experience.
Because higher levels require successively more experience, each of the levels 16, 22, 30, and 39 is about halfway to the next in the list.