Algorithm to compute pandigital numbers.