The Logic of Numbers