Saturday 7 December 2019

divisibility - Numbers divisible by all of their digits: Why don't 4's show up in 6- or 7- digit numbers?



For reasons I'll explain below the question if you're interested, I stumbled across a peculiar phenomenon involving numbers divisible by their digits.



I'm concerned with numbers that are divisible by all of its digits, and do not have any zeros or repeated digits.




Ex: 175, 9867312, 1



Not: 111, 105



There are 548 such numbers: 105 of them have 6 or more digits. (There can't be any with more than 7 digits, for reasons I'll leave you to discover.*) For some reason, though, no six- or seven- digit numbers have any 4's in their digits.
Why?



I know why there can't be any 8 digit numbers: 1+2+3+4+6+7+8+9 = 40, which is not divisible by 3, so 9, 6, and 3 won't divide. But why don't 4's show up past 6 digits?







Explanation for why I have this question:



*About two years ago I was in a TI-Basic programming competition which required me to write the following program:



A number is said to be "digisible" if it meets the following three conditions:
- It has no 0;
- All digits which compose it are different from each other;
- It is divisible by each of the digits that compose it.

You will have to make a program that asks a positive integer greater than or equal to 10 and displays 1 if it is digisible, 0 if it is not.



This was a fun challenge to create and super-optimize in TI-Basic. TI-Basic is really slow, so it wasn't possible to check all numbers for "digisible"-ness. However, in the past year I learned Java, which is speedy-fast. So I returned to the problem and made a program to list out ALL of the digisible numbers.



Looking at all of the Digisibles, I noticed some cool things, some of which makes sense, others which I couldn't find an explanation for. This question is one that I couldn't find an explanation for, but highly suspect one exists.



Hint: 5's do not show up past 5 digit numbers.


Answer



As you point out, a 7-digit number cannot have a 5 in it (otherwise, it would have to end in 5, but would have to have one of 2, 4, 6, or 8 in it, so must be even). Thus a 7-digit number $x$ contains 7 of 1, 2, 3, 4, 6, 7, 8, 9. We need only identify the missing digit. If it is not 9, the resulting number must be divisible by 9, so the missing digit must be 4 ($40-4 = 36$). If the missing digit is 9, then the digits are 1, 2, 3, 4, 6, 7, 8. But the sum here is $40-9=31$, which is not divisible by 3. So this cannot happen.




Thus any 7-digit number of this type must consist of the digits 1, 2, 3, 6, 7, 8, 9.


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...