Ugly Hedgehog - Photography Forum
Home Active Topics Newest Pictures Search Login Register
Check out Photo Critique Section section of our forum.
General Chit-Chat (non-photography talk)
Intriguing Puzzle No 6
Apr 7, 2022 21:43:31   #
twosummers Loc: Melbourne Australia or Lincolnshire England
 
OK - here we go again and this one WILL take some time. I posted this a couple of years ago so no looking it up. Hopefully it's a new one for some of you.

The puzzle is relatively easy to comprehend - take each of the integers 1 to 9 and make a nine-digit number where - the number in the first position is evenly divisible by 1, the first 2 numbers divisible by 2, the first 3 numbers divisible by 3 and so on.

At first I thought it was easy - start with 1 (that's divisible by 1) then 12 (that's divisible by 2), then 123 (that's divisible by 3) hey this IS easy - now take 1234 and oops (that's not divisible by 4!) and I was going along so well, so back to the start....

At first glance there appears to be an unmanageable number of options to test (9! - there's that pesky factorial again) but wait! - using my ancient and incomplete divisibility rules - the number 5 must be at position 5 as any number ending in 5 or 0 is divisible by 5 and as we don't have to worry about 0 then our first (5th) digit piece of the puzzle must be a 5!! - yippee - I have one digit in the right place.

Then of course the digits in position 2,4,6 and 8 must be even numbers (2,4,6 or 8) as only even numbers are divisible by even numbers. So that leaves the numbers 1,3,5,7 and 9 to occupy the remaining places. I think that reduces the options from a horrendously large number to just a frighteningly large number.

I think I could maybe write a computer program to find the (or a) solution but that would be cheating as would Googling - I confess to using Excel to check the quotients (is that a word?) and to make matters worse a few times I get to the 8th digit and that fails the divisibility test. What IS it about that pesky number 8?

Remember the rules - no Googling or asking a nearby child haha (or in this case no computer programming)

Good luck and keep safe

Reply
Apr 8, 2022 19:17:46   #
jimkolt Loc: Sun City, AZ
 
I believe the answer is 963,258,147

Reply
Apr 8, 2022 20:02:54   #
twosummers Loc: Melbourne Australia or Lincolnshire England
 
Close but that pesky 8th position fails

Reply
 
 
May 6, 2022 04:56:10   #
SalvageDiver Loc: Huntington Beach CA
 
The answer is 381,654,729.

I thought about this puzzle for some time, looking for a short method to solve, but I really didn't come up with one. But I was able to reduce the effort from 9! to something much much smaller, to something manageable using pencil and paper.

The first step was to look at all the possible first two numbers and remove all numbers that had a "0" OR "5" OR had duplicate numbers in it AND not divisible by 2. This reduced the possibilities from 100 down to 28 pairs. The final answer has one of the 28 pairs in the first two spots.

Then, taking the 28 pairs, adding 1...9 in the 3rd position. This reduced the number of possible triple combinations down to 252 (28x9). Doing the same evaluation of removing any triplet that contained a "0" OR "5" or had duplicate numbers in it AND not odd AND not divisible by 3. This reduced the triplets from 252 to 36. The final answer has one of the 36 triples in the first three spots.

I continued this basic process evaluating 'odd' numbers for 'odd' positions and 'even' numbers for 'even' positions. Just added '5' to the fifth position.

It's still a finessed brute forced method, but it works.

Reply
May 6, 2022 18:15:02   #
twosummers Loc: Melbourne Australia or Lincolnshire England
 
SalvageDiver wrote:
The answer is 381,654,729.

I thought about this puzzle for some time, looking for a short method to solve, but I really didn't come up with one. But I was able to reduce the effort from 9! to something much much smaller, to something manageable using pencil and paper.

The first step was to look at all the possible first two numbers and remove all numbers that had a "0" OR "5" OR had duplicate numbers in it AND not divisible by 2. This reduced the possibilities from 100 down to 28 pairs. The final answer has one of the 28 pairs in the first two spots.

Then, taking the 28 pairs, adding 1...9 in the 3rd position. This reduced the number of possible triple combinations down to 252 (28x9). Doing the same evaluation of removing any triplet that contained a "0" OR "5" or had duplicate numbers in it AND not odd AND not divisible by 3. This reduced the triplets from 252 to 36. The final answer has one of the 36 triples in the first three spots.

I continued this basic process evaluating 'odd' numbers for 'odd' positions and 'even' numbers for 'even' positions. Just added '5' to the fifth position.

It's still a finessed brute forced method, but it works.
The answer is 381,654,729. br br I thought about ... (show quote)


Well done, I eventually got 381654729 too. The problem can be simplified a bit by getting 5 in the right place as a number divisible by 5 etc. Then numbers in even places are of course even numbers. My problem was trying guesses that I had tried before so I reverted to a spreadsheet for this and to check my brute force guesses. I found it a challenge and it stumped a lot of people. So well done again

I think there is only one solution

Reply
If you want to reply, then register here. Registration is free and your account is created instantly, so you can post right away.
Check out Digital Artistry section of our forum.
General Chit-Chat (non-photography talk)
UglyHedgehog.com - Forum
Copyright 2011-2024 Ugly Hedgehog, Inc.