Problem 52644. List modest numbers up to n
After determining the nude numbers, or the numbers that openly display some of their divisors as their digits, one would think that the modest numbers were those not divisible by any of their digits. Instead a modest number x is one that can be divided into two parts a and b such that when x is divided by b, the remainder is a. For example, 411 is modest because it can be divided into 4 and 11, and dividing 411 by 11 leaves a remainder of 4.
Write a function to list the modest numbers up to n.
Solution Stats
Problem Comments
-
1 Comment
GeeTwo
on 30 Dec 2022
No one has asked whether a must be at the big end and b at the small end, or could they be swapped. The answer is clearly yes, a is at the big end. If you could swap them, every multiple of 10 would be a solution (among many others). The test cases show multiples of 10 are not solutions to the first few.
Solution Comments
Show commentsProblem Recent Solvers8
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
48988 Solvers
-
1300 Solvers
-
Back to basics 11 - Max Integer
780 Solvers
-
Back to basics 12 - Input Arguments
594 Solvers
-
Factorions: Numbers that equal the sum of the factorials of their digits
71 Solvers
More from this Author272
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!