Problem 2721. Pandigital Factors (Based on Euler 491)
A Pandigital Number is a number containing all of the digits from 0-9 inclusive, with the added stipulation that it does not have a leading zero. Lower level pandigital numbers just contain the digits 0-X, where X is less than 9.
Write a MATLAB script that takes as input the number X, and another integer Y. Determine how many pandigital numbers containing the digits 0-X are evenly divisible by Y. For example, there are thirteen pandigital numbers containing 0-4 that are evenly divisible by 7:
43120 42301 41230 32410 31402 31024 30142 23401 24031 20314 14203 10234 10423
The number 03421 does not count. Even though it contains all of the digits 0-4, it has a leading zero. Therefore, the output of pandigit_factors(4,7) would be 13. You do not need to output all of the numbers themselves, just how many of them there are. Good luck!
Solution Stats
Problem Comments
Solution Comments
Show commentsGroup

Linear Algebra
- 15 Problems
- 53 Finishers
- Column norms of a matrix
- linear least squares fitting
- System of equations
- Linear system of equations
- Solve the set of simultaneous linear equations
- Combined Ages 1 - Symmetric, n = 3
- Combined Ages 2 - Symmetric, n ≥ 3
- Combined Ages 3 - Non-symmetric, n ≥ 3
- Combined Ages 4 - Non-symmetric with multiples, n ≥ 3
- Outer product of multiple vectors
- Determine if input is a valid AHP evaluation matrix
- Is this matrix orthogonal?
- Orthonormal matrix
- Nilpotent matrix
- Projector Matrix
Problem Recent Solvers35
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!