login
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

%I #17 Jun 08 2024 15:44:21

%S 1024,4096,5776,240100,540225,960400,1500625,2160900,26357956,

%T 688012900,843612025,1548029025,2296038889,2353026064,2679097600,

%U 2752051600,3374448100,4300080625

%N 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).

%C Squares that can be split up in more than one way appear only once.

%H Reiner Moewald and Giovanni Resta, <a href="/A257650/b257650.txt">Table of n, a(n) for n = 1..156</a> (first 22 terms from Reiner Moewald)

%e 1024 = 32^2 and 10^2 + 24^2 = 26^2.

%o (Python)

%o import math

%o print("Start")

%o list =[]

%o for i in range(1, 100000):

%o a = i*i

%o b = str(a)

%o l = len(b)

%o for j in range(1, l):

%o a_1 = b[:j]

%o a_2 = b[j:]

%o c = int(a_1)*int(a_1)+int(a_2)*int(a_2)

%o sqrt_c = int(math.sqrt(int(c)))

%o if (sqrt_c * sqrt_c == c) and (int(a_2[:1]) > 0):

%o if not a in list:

%o list.append(a)

%o print(list)

%o print("End")

%K nonn,base

%O 1,1

%A _Reiner Moewald_, Jul 25 2015