Find all 3-digit numbers divisible by a sum of groups of its digits

764 Views Asked by At

How to find all three-digit number which are divisible by a sum of specific digit groups explained below?

The original number should have only non-zero and non-repeating digits.

example:
$301$ has a zero digit - cannot be used
$331$ does not have different digits - cannot be used

And the number should be divisible by two-digit group of its own digits, which are made by omitting one of the number's digits.

example:
$785$ should be divisible by $78$, $75$, and $85$.

I have come just to this:

If the number is made of digits $a, b, c$ like this $[abc]$, the number should be divisible by
$(10a + b) + (10b + c) + (10a + c) = 20a + 11b + 2c$

But I am not sure how to find all of the suitable numbers.

Thanks a lot for your time!

1

There are 1 best solutions below

2
On

The following PARI/GP program finds the $4$ solutions , if we only demand that the number is divisible by the sum of the three numbers :

? for(a=1,9,for(b=0,9,for(c=0,9,if(Mod(100*a+10*b+c,20*a+11*b+2*c)==0,if(a*b*c<>
0,if(length(Set([a,b,c]))==3,print([a,b,c])))))))
[1, 3, 8]
[2, 9, 4]
[3, 5, 1]
[4, 5, 9]
?