Much of mathematics has the appeal of magic, and some of it really is—pure magic.