Title: | Mathematics at DEC |
Moderator: | RUSURE::EDP |
Created: | Mon Feb 03 1986 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2083 |
Total number of notes: | 14613 |
Note 689 evoked this: Problem: Compose a 9-digit number using the numbers 1..9 each exactly once where the first 1..N digits of the number are divisible by N (e.g. the first digit is divisible by 1, the first two numbers by 2...). I have found a solution using the computer, but is there a _non-computer_ way? Wildrik, :-) Computer's solution: ****** SPOILER ***************** Don't you want to try first? 381654729
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1331.1 | Nearly | SIEVAX::CHANT | Thu Nov 08 1990 09:48 | 81 | |
Take the 9 digit number as abcdefghi e = 5 since 5|abcde b,d,f,h are even since 2|ab ,4|abcd etc 6 | abcdef -> 3 | a+b+c+d+e+f since 3|a+b+c -> 3| d+e+f since e = 5, 3|d+f+2 (=6,9,12,15,18,21,24..) d,f are even d+f+2 = 6,12,18 d+f = 4,10,16 {d,f} = {} (4) {2,8},{4,6} (10) {} (16) d+e+f = 15 since d+f = 10 9|a+b+c+d+e+f+g+h+i 9|a+b+c+15+g+h+i 3|g+h+i 2|ab 4|abcd -> 4|ab*100+cd -> 4|cd {c,d} = {1,6},{2,4},{2,8},{4,8} c is odd gives c = 1 and d = 6 ... d+e+f = 15 -> f = 4 ... numbers left are {2,3,7,8,9} 8|abcdefgh -> 8|abcde*1000+400+gh -> 8|gh 32,72,92,38,78,or 98 if 8|h -> 8|10*g but g is odd so -> gh = {32,72,92} -> h = 2 3|a+b+c -> 3|a+b+1 = (6,9,12,15,18,21,24) a+b is odd a+b+1 = (6,12,18) a+b = (5,11,17) {a,b} = {3,8} = 11 {9,8} = 17 -> b = 8 So far we have : a = {3,9} b = 8 c = 1 d = 6 e = 5 f = 4 g = {3,7,9} h = 2 i = {3,7,9} ?81654?2? -> 3816547 3816549 = 38165*100+7*7 9816543 9816547 Does 7 divide any of the above ? Now need the calculator... and the answer is 7|3816547 so abcdefghi = 381654729 Adrian | |||||
1331.2 | My words exactly...:-) | IOSG::CARLIN | Dick Carlin IOSG, Reading, England | Thu Nov 08 1990 10:31 | 21 |
... except that from this point > ?81654?2? onwards you can put away your calculator and reason as follows: Up until now we've exhausted what the simple divisibility tests tell us and it just remains to get the division by 7 to yield some facts. Taking the partial remainders when you divide 7 into 10^6 we get the following test: 7 must divide (a + 5*b + 4*c + 6*d + 2*e + 3*f + g) and substituting for b to f this simplifies to (a+g) = 3 (mod 7) which, in the light of the previous restrictions means a=3 and g=7, so i=9. Dick | |||||
1331.3 | Generalise | IOSG::CARLIN | Dick Carlin IOSG, Reading, England | Tue Feb 04 1997 14:15 | 22 |
This problem was in a local paper two weekends ago and the solution appeared last weekend. According to the article "... several readers pointed out that there were three solutions, this one, 921654387 and 963258147". Well, several readers were mistaken. Both extra solutions obviously fail the 8 test (on 438 and 814). It's interesting that 987654321 almost works as well. It just fails the difficult 7 test. But the article did mention that the longest N-divisible number was ... Anyone care to have a go? (An N-divisible number's first N digits are divisible by N. The restriction on digits appearing exactly once is lifted.) Dick I had completely forgotten that I had already replied to this note. My memory is obviously on the way out. I found it by an Altavista search on the string "38165"! | |||||
1331.4 | longest N-divisible number | 63509::YODER | MFY | Tue Feb 04 1997 15:28 | 3 |
3816547290608 I'll let someone else do the explaining if necessary... | |||||
1331.5 | SPECXN::DERAMO | Dan D'Eramo | Tue Feb 04 1997 20:09 | 29 | |
>.4 > 3816547290608 > > I'll let someone else do the explaining if necessary... I find 1575 N-Divisible 13-digit numbers 1132 N-Divisible 14-digit numbers 770 N-Divisible 15-digit numbers 571 N-Divisible 16-digit numbers 335 N-Divisible 17-digit numbers 180 N-Divisible 18-digit numbers 90 N-Divisible 19-digit numbers 44 N-Divisible 20-digit numbers 18 N-Divisible 21-digit numbers 12 N-Divisible 22-digit numbers 6 N-Divisible 23-digit numbers 3 N-Divisible 24-digit numbers 144408645048225636603816 360852885036840078603672 402852168072900828009216 1 N-Divisible 25-digit number 3608528850368400786036725 0 N-Divisible 26-digit numbers with the unique longest being 3608528850368400786036725. Dan | |||||
1331.6 | AUSS::GARSON | DECcharity Program Office | Tue Feb 04 1997 20:44 | 9 | |
re .4,.5 These two notes seem to be in contradiction unless I have misunderstood (which wouldn't surprise). Is it the case that in dropping the condition that no digit may be repeated it is also the case that an N-divisible number of length 10 (or longer) need not have the unique solution for length 9 (of the original problem) as a prefix? | |||||
1331.7 | IOSG::CARLIN | Dick Carlin IOSG, Reading, England | Wed Feb 05 1997 04:48 | 13 | |
Derek The generalisation includes the fact that 0 can now be introduced as a digit. (.4) did not make use of that, (.5) did. (.5) agrees with what the article gave. Well that problem didn't last long, did it? Dan A pooter wasn't involved in that search by any chance? Dick | |||||
1331.8 | SPECXN::DERAMO | Dan D'Eramo | Wed Feb 05 1997 11:09 | 5 | |
> A pooter wasn't involved in that search by any chance? As I recall, one was. :-) Dan | |||||
1331.9 | a dumb error on my part | 63509::YODER | MFY | Wed Feb 05 1997 12:13 | 5 |
The error came from reading the note and replies too quickly... I omitted to notice that there isn't a unique N-divisible number of length 9 if the restriction on the digits is lifted. Thanks. |