In mathematics, a pandigital number is an integer that in a given base has among its significant digits each digit used in the base at least once. For example, 1234567890 (one billion two hundred thirty-four million five hundred sixty-seven thousand eight hundred ninety) is a pandigital number in base 10.
Smallest pandigital numbers The first few pandigital base 10 numbers are (sequence A171102 in the OEIS):
1023456789, 1023456798, 1023456879, 1023456897, 1023456978, 1023456987, 1023457689 The smallest pandigital number in a given base b is an integer of the form
b b − 1 + ∑ d = 2 b − 1 d b b − 1 − d = b b − b ( b − 1 ) 2 + ( b − 1 ) × b b − 2 − 1 {\displaystyle b^{b-1}+\sum _{d=2}^{b-1}db^{b-1-d}={\frac {b^{b}-b}{(b-1)^{2}}}+(b-1)\times b^{b-2}-1}
The following table lists the smallest pandigital numbers of a few selected bases:
As well as some other numeral systems:
OEIS: A049363 gives the base 10 values for the first 18 bases. In a trivial sense, all positive integers are pandigital in unary (or tallying). In binary, all integers are pandigital except for 0 and numbers of the form 2 n − 1 {\displaystyle 2^{n}-1} (the Mersenne numbers). The larger the base, the rarer pandigital numbers become, though one can always find runs of b x {\displaystyle b^{x}} consecutive pandigital numbers with redundant digits by writing all the digits of the base together (but not putting the zero first as the most significant digit) and adding x + 1 zeroes at the end as least significant digits. Conversely, the smaller the base, b {\displaystyle b} , the fewer pandigital numbers without redundant digits there are. 2 is the only such pandigital number in base 2, while there are more of these in base 10. The formula is ( b − 1 ) ( b − 1 ) ! {\displaystyle (b-1)(b-1)!} .
… excerpt ends here. Continue reading the full article.
