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

Home > Numbers
Square = Square + Square (Posted on 2008-08-26) Difficulty: 3 of 5
Determine all 6 digit perfect squares such that the first three digits form a perfect square as do the last three.

The square formed by the first three digits may not have leading zeroes.

See The Solution Submitted by brianjn    
Rating: 2.5000 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution re: Solution - brute force | Comment 2 of 7 |
(In reply to Solution - brute force by andre)

Yes, I get these five also:

DEFDBL A-Z
minb = -INT(-SQR(100000))
maxb = INT(SQR(999999))
PRINT minb; maxb, minb * minb; maxb * maxb

FOR b = minb TO maxb
  n1 = VAL(LEFT$(LTRIM$(STR$(b * b)), 3))
  n2 = VAL(RIGHT$(LTRIM$(STR$(b * b)), 3))
  sr = INT(SQR(n1) + .5)
  IF sr * sr = n1 THEN
    sr = INT(SQR(n2) + .5)
    IF sr * sr = n2 THEN
       PRINT b, b * b
    END IF
  END IF
NEXT

 b              b^2
380           144400
475           225625
506           256036
570           324900
759           576081

Edited on August 26, 2008, 12:14 pm
  Posted by Charlie on 2008-08-26 11:50:39

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