This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A055616 #32 Dec 20 2024 10:06:51 %S A055616 1233,8833,990100,94122353,1765038125,2584043776,7416043776, %T A055616 8235038125,9901009901,116788321168,123288328768,876712328768, %U A055616 883212321168,999900010000,13793103448276,15348303604525,84651703604525,86206903448276,91103202846976,92318202663025 %N A055616 Numbers, with an even number of digits, that are the sum of the squares of their two halves (leading zeros allowed only for the second half). %C A055616 The sequence is infinite since it contains several infinite subsequences (see A055617, etc.). %C A055616 If x = A*10^n+B is an element not beginning with 9, then (10^n-A)*10^n+B is another (e.g. 1233 <-> 8833). %C A055616 Numbers that can be written as n = A*10^d + B with 10^(d-1) <= A < 10^d, 0 <= B < 10^d, and A^2 + B^2 = n. - _Robert Israel_, May 10 2015 %H A055616 Robert Israel, <a href="/A055616/b055616.txt">Table of n, a(n) for n = 1..1000</a> %e A055616 8833 is ok, since 8833 = 88^2 + 33^2. %p A055616 dmax:= 8: # to get all entries with at most 2*dmax digits %p A055616 Res:= NULL: %p A055616 for d from 2 to dmax do %p A055616 cands:= map(t -> subs(t,[x,y]), [isolve(x^2 + y^2 = 10^(2*d)+1)]); %p A055616 cands:= select(t -> t[1]::even and t[1]>=0 and t[2]>0, cands); %p A055616 cands:= map(t -> ([(10^d + t[1])/2, (t[2]+1)/2], [(10^d-t[1])/2, (t[2]+1)/2]), cands); %p A055616 cands:= select(t -> (t[1]>= 10^(d-1) and t[1] < 10^d and t[2] <= 10^d), cands); %p A055616 Res:= Res, op(map(t -> 10^d*t[1]+t[2], cands)); %p A055616 od: %p A055616 sort([Res]); # _Robert Israel_, May 10 2015 %t A055616 fQ[n_] := Block[{d = IntegerDigits@ n}, If[OddQ[Length@ d], False, Plus[FromDigits[Take[d, Length[d]/2]]^2, FromDigits[Take[d, -Length[d]/2]]^2]] == n]; Select[Range@ 1000000, fQ] (* _Michael De Vlieger_, May 09 2015 *) %o A055616 (Python) %o A055616 def a(): %o A055616 n = 1 %o A055616 while n < 10**6: %o A055616 st = str(n) %o A055616 if len(st) % 2 == 0: %o A055616 s1 = st[:int(len(st)/2)] %o A055616 s2 = st[int(len(st)/2):int(len(st))] %o A055616 if int(s1)**2+int(s2)**2 == int(st): %o A055616 print(n,end=', ') %o A055616 n += 1 %o A055616 else: %o A055616 n += 1 %o A055616 else: %o A055616 n = 10*n %o A055616 a() %o A055616 # _Derek Orr_, Jul 08 2014 %o A055616 (PARI) select( {is_A055616(n, L=logint(n,10))=L%2 && n==norml2(divrem(n,10^(L\/2)))}, [1..10^5]) \\ _M. F. Hasler_, Dec 20 2024 %o A055616 for(L=1,oo, for(n=10^L,10^L++, is_A055616(n)&& print1(n", "))) \\ slow beyond 10^6 %Y A055616 Cf. A064942 for the number of solutions, where leading zeros are allowed. %Y A055616 Cf. A055617, A055618, A055619. %K A055616 nonn,base %O A055616 1,1 %A A055616 Ulrich Schimke (ulrschimke(AT)aol.com) %E A055616 Definition corrected by _Derek Orr_, Jul 09 2014