Method #1 is more general formula Method #2 is restricted to the 3-digit number