This isn't mine. Suppose a positive integer is expressed in decimal notation. It is 'good' if the first n digits, read left to right, form a number divisible by n, for all n from 1 up to the total number of digits in the number. For example, 1236 is good since 12 is divisible by 2, 123 is divisible by three, and 1236 is divisible by 4. The puzzle is to find a number with each of the digits 1,2,3,4,5,6,7,8,9 used once, that is good.
Originally posted by royalchickenIs it allowed to use the digit zero? If not, does that mean you have to find an integer that consists of 9 different digits?
This isn't mine. Suppose a positive integer is expressed in decimal notation. It is 'good' if the first n digits, read left to right, form a number divisible by n, for all n from 1 up to the total number of digits in the number. For example, 1236 is good since 12 is divisible by 2, 123 is divisible by three, and 1236 is divisible by 4. The puzzle is to find a number with each of the digits 1,2,3,4,5,6,7,8,9 used once, that is good.
Originally posted by royalchicken123456789 in any order form a multiple of 9. and the first number is always a multiple of 1.
This isn't mine. Suppose a positive integer is expressed in decimal notation. It is 'good' if the first n digits, read left to right, form a number divisible by n, for all n from 1 up to the total number of digits in the number. For example, 1236 is good since 12 is divisible by 2, 123 is divisible by three, and 1236 is divisible by 4. The puzzle is to find a number with each of the digits 1,2,3,4,5,6,7,8,9 used once, that is good.
the second number has to be even, the third and fourth together must be a multiple of 4, the sixth, seventh and eighth together must be a multiple of 8. The sum of the first three digits must be a multiple of 3. And the fifth digit has to be a 5. the first six must be a multiple of 6, and thus the sum must be a multiple of 3. thus the 4th, 5th and 6th must be a multiple of three.
In formulas;
abcdefghi
5|abcde => e=5
2|ab => 2|b
4|abcd => 4|cd
8|abcdefgh => 8|fgh
3|abc => 3|a+b+c
6|abcdef => 3|d+e+f
=> 2|f
7|abcdefg
Originally posted by TheMaster37With 7 digits I get 2 possibilities when I apply your formulas to it
123456789 in any order form a multiple of 9. and the first number is always a multiple of 1.
the second number has to be even, the third and fourth together must be a multiple of 4, the sixth, seventh and eighth together must be a multiple of 8. The sum of the first three digits must be a multiple of 3. And the fifth digit has to be a 5. the first six ...[text shortened]... 8|fgh
3|abc => 3|a+b+c
6|abcdef => 3|d+e+f
=> 2|f
7|abcdefg
1296547 and 1472583.
If this is right there is no solution. If I am wrong (more likelyπ ) I am curious.
Take the number in question. Divide it by 7. If the fractional part is 0, you've lucked out π.
Seriously, try this. Take the last digit, and multiply it by two. Then subtract it from the number formed by truncating the last digit from the given number. Repeat until it is small enough to divide it. For example:
1234 -> 123 - 8 = 115, 11 - 10 = 1, 1234 is not a multiple of seven.
I think it works.
Originally posted by royalchicken
There is a solution.
And that is 381 654 729.
An 'easy' way to find the solution for ABC DEF GHI is to start with the middle part.
E = 5
D and F must be even
D+ E+ F is a multiple of 3
This leaves 4 possibilities (258, 456, 654, 852)
B, D, F, H are all even (2, 4, 6, 8)
? A, C, E, G and I are all odd
CD is a multiple of 4
And C is uneven, but not 5
This leaves for CD 4 possibilities (32, 72, 16, and 96)
This leaves 4 possibilities for CDEF
1654, 3258, 7258 and 9654
A + B + C is a multiple of 3
A and C are odd (not 5)
B is even
This leaves 20 possibilities for ABC (321, 381, 741, 921, 981, 123,183, 723, 783, 963, 147, 327, 387, 927, 987, 129, 189, 369, 729, and 789),
Combined this leaves 10 Possibilities for ABCDEF
(321654, 381654, 921654, 981654, 963258, 147256, 129654, 189654, 729654 and 789654)
Now you can see what is needed for G by dividing ABCDEFG by 7.
That gives 6 possibilities (3816547, 9216543, 1472569, 1296547, 7296541 and 7296548)
FGH must be divisible by 8.
That leaves 38165472
And the last number (I) must be a 9.
Happy New Year
Fjord
Originally posted by fjordI got there first π
And that is 381 654 729.
An 'easy' way to find the solution for ABC DEF GHI is to start with the middle part.
E = 5
D and F must be even
D+ E+ F is a multiple of 3
This leaves 4 possibilities (258, 456, 654, 852)
B, D, F, H are all even (2, 4, 6, 8)
? A, C, E, G and I are all odd
CD is a multiple of 4
And C is uneven, but not 5
This leave ...[text shortened]... le by 8.
That leaves 38165472
And the last number (I) must be a 9.
Happy New Year
Fjord
Originally posted by AcolyteStupid me π³ I had missed that part of your post.
I got there first π
All the honor to you π
Anyway by doing it again we have a 'scientific proof' that ihere is one and only one possibility π
Just now I threw the number in Google and found out that the number is rather famous.
And I found there another puzzle, I thought was nice mentioning.
What is the longest positive integer that is polydivisible (as above) and that is also a palindrome?
E.g. 50405 is a palindrome and polydivisble.
All digits (zero, 1,2,3,4,5,6,7,8,9) are permitted as many times as you want.
To give you a hint: the solution exists of 11 digits
Greetings, Fjord
Seriously, try this. Take the last digit, and multiply it by two. Then subtract it from the number formed by truncating the last digit from the given number. Repeat until it is small enough to divide it. For example:what if the number ends with a zero?...ie., 1300?
1234 -> 123 - 8 = 115, 11 - 10 = 1, 1234 is not a multiple of seven.
I think it works.
Originally posted by kaushpaulIt still works. 1300, for example:
what if the number ends with a zero?...ie., 1300?
130-(2*0)=130
13-(2*0)=13
1-(2*3)=-5, which is not divisible by seven, therefore 1300 is not divisible by seven
Or, for 980:
98-(2*0)=98
9-(2*8)=-7, which is divisible by seven, therefore 980 is divisible by seven
Cool trick!