|
|
A257650
|
|
Squares that are the concatenation of two Pythagorean integers a and b with a^2 + b^2 = c^2 (a and b are without any left-hand zeros).
|
|
1
|
|
|
1024, 4096, 5776, 240100, 540225, 960400, 1500625, 2160900, 26357956, 688012900, 843612025, 1548029025, 2296038889, 2353026064, 2679097600, 2752051600, 3374448100, 4300080625
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Squares that can be split up in more than one way appear only once.
|
|
LINKS
|
|
|
EXAMPLE
|
1024 = 32^2 and 10^2 + 24^2 = 26^2.
|
|
PROG
|
#Python
import math
print("Start")
list =[]
for i in range(1, 100000):
...a = i*i
...b = str(a)
...l = len(b)
...for j in range(1, l):
......a_1 = b[:j]
......a_2 = b[j:]
......c = int(a_1)*int(a_1)+int(a_2)*int(a_2)
......sqrt_c = int(math.sqrt(int(c)))
......if (sqrt_c * sqrt_c == c) and (int(a_2[:1]) > 0):
.........if not a in list:
............list.append(a)
print(list)
print("End")
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|