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

Home > Numbers
Three Concatenations (Posted on 2024-03-15) Difficulty: 3 of 5
Determine three positive integers A, B and C such that the concatenations AB, AC and BC are all squares, and the sum A+B+C is also a square.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 4
tots=1;
for n=2:5000
  tots(end+1)=n^2;
end
for t=3:length(tots)
  tot=tots(t);
  for a=1:tot-2
    as=num2str(a);
    for b=1:tot-a-1
      bs=num2str(b);
      c=tot-a-b;
      cs=num2str(c);
      ab=str2double([as bs]);
      sr=round(sqrt(ab));
      if sr^2==ab
        ac=str2double([as cs]);
        sr=round(sqrt(ac));
        if sr^2==ac
          bc=str2double([bs cs]);
          sr=round(sqrt(bc));
          if sr^2==bc
            disp([a b c])
          end
        end
      end
    end
  end
end

finds

>> threeConcatenations
   108    16   900
Operation terminated by user during int2str

showing A, B and C.

AB = 10816 = 104^2
AC = 108900 = 330^2
BC = 16900 = 130^2


  Posted by Charlie on 2024-03-15 10:48:05
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 (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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