Discworld 3: Equal Rites - Terry Pratchett
Tax included.
A wizard predicts his own death and readies himself for the traditional transfer of power to the eighth son of an eighth son. The snag is that the eighth son is a daughter and women can't be wizards.