Super Pandigital Numbers

A positive number is pandigital in base $b$ if it contains all digits from $0$ to $b – 1$ at least once when written in base $b$.
An $n$-super-pandigital number is a number that is simultaneously pandigital in all bases from $2$ to $n$ inclusively.
For example $978 = 1111010010_2 = 1100020_3 = 33102_4 = 12403_5$ is the smallest $5$-super-pandigital number.
Similarly, $1093265784$ is the smallest $10$-super-pandigital number.
The sum of the $10$ smallest $10$-super-pandigital numbers is $20319792309$.
What is the sum of the $10$ smallest $12$-super-pandigital numbers?

Calculating the sum of the smallest $10$ $12$-super-pandigital numbers requires checking a large number of possibilities, so it might take some time.
Here’s a Python code that can be used to find the answer:

,,,,,,,,,,,,
def is_pandigital(n, base):
digits = set()
while n > 0:
digit = n % base
if digit in digits or digit >= base:
return False
digits.add(digit)
n //= base
return len(digits) == base

def find_smallest_super_pandigital(limit, num_bases):
n = 1
count = 0
while count < limit: if all(is_pandigital(n, base) for base in range(2, num_bases + 1)): count += 1 yield n n += 1 limit = 10 num_bases = 12 result = sum(find_smallest_super_pandigital(limit, num_bases)) print(result)

More Answers:
Reciprocal Games II
Prime Mountain Range
Snowflakes

Error 403 The request cannot be completed because you have exceeded your quota. : quotaExceeded

Share:

Recent Posts

Mathematics in Cancer Treatment

How Mathematics is Transforming Cancer Treatment Mathematics plays an increasingly vital role in the fight against cancer mesothelioma. From optimizing drug delivery systems to personalizing

Read More »