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.
Searching integers up to 10,000 I found only one solution:
(A, B, C): (108, 16, 900)
√10816 = 104
√108900 = 330
√16900 = 130
√(108 + 16 + 900) = √1024 = 32
------------
big = 10000
for a in range(1,big):
for b in range(1,big):
if not issquare(int(str(a)+str(b))):
continue
for c in range(1,big):
if not issquare(a+b+c):
continue
if not issquare(int(str(a)+str(c))):
continue
if not issquare(int(str(b)+str(c))):
continue
print(a,b,c)
|
Posted by Larry
on 2024-03-15 12:49:34 |