The Maths of Coins and Currencies