Implemented pandigital utility function.