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

Home > Numbers
Square creates square (Posted on 2021-05-18) Difficulty: 2 of 5
Compile a list of all square integers below 10,000, not terminating by zero, such that erasing their two last digits creates a new square number.

See The Solution Submitted by Ady TZIDON    
Rating: 5.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 2 of 9 |
for sr=1:9999999
   sq=sr*sr;
   s=num2str(sq);
   l=length(s);
   if l>=3
      s2=s(1:l-2);
      if ~isequal(s(l),'0')
       sq2=str2num(s2);
       sr2=round(sqrt(sq2));
       if sr2*sr2==sq2
          disp(sq) 
       end
      end
   end
end

   121
   144
   169
   196
   441
   484
   961
  1681

Numbers almost all the way to 10^14 that were squares (of numbers up to almost 10^7) were tested, leading one to believe that the list is exhaustive, and all such numbers are below 10,000.

  Posted by Charlie on 2021-05-18 09:05:59
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
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