All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Door lock Combination (Posted on 2024-12-27) Difficulty: 3 of 5
The door to Prof. Adams laboratory has one of those keypad locks that requires entering five digits to open. Unfortunately, he has a hard time remembering the combination, but he has figured out a way to determine it.

The five digits are all different, and he has observed that the first two digits form a perfect square, while the last two digits form a smaller perfect square. Also, the middle digit is the smallest. If he arranges the five digits to form all possible five-digit integers (leading zeros allowed) and adds all these numbers, the sum is a palindrome, with each of its digits a multiple of three.

What is the combination?

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution mostly computer solution | Comment 2 of 3 |
clc
sqs=[4:9].^2;
for i=1:length(sqs)-1
  last=num2str(sqs(i));
  for j=i+1:length(sqs)
    first=num2str(sqs(j));
    m=char(min([first last]));
    for mid='0':char(m-1)
      n=[first mid last];
      if isequal(sort(n),unique(n))
        if isPalin(sum(str2num(perms(n))))
          comb=[n];
          disp([str2num(n) sum(str2num(perms(n)))])
        end
      end
    end
  end
end

finds all numbers fitting each criterion except for checking that each digit of the sum of the permutations of the digits is a multiple of 2. The candidates are

    combination  sum of
               permutations
       36025     4266624
       81025     4266624
       49236     6399936
       
Only the last row has the sum of permutations' digits all be multiples of 3, so the combination is 49236.       

  Posted by Charlie on 2024-12-27 10:44:57
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information