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 A064942 #4 Mar 30 2012 16:49:14 %S A064942 1,1233,8833,10100,990100,5882353,94122353,99009901,100010000, %T A064942 1765038125,2584043776,7416043776,8235038125,9901009901,48600220401, %U A064942 116788321168,123288328768,601300773101,876712328768,883212321168,990100990100 %N A064942 Decimal numbers n such that after possibly prefixing leading 0's to n, the resulting number n' can be broken into 2 numbers of equal length, n' = xy, such that x^2+y^2 = n (y may also have leading zeros). %C A064942 If A*10^m+B is an element, then so is (10^m-A)*10^m+B (e.g. 1233 <-> 8833 or 010100 <-> 990100) %C A064942 Since A^2+B^2 = A*10^m+B can be written as 10^(2*m)+1 = (2*A-10^m)^2 + (2*B-1)^2 the number of solutions with 2*m digits (necessary leading zeros count) can be reduced to finding the ways 10^(2*m)+1 can be written as sum of 2 squares. For the following results, see A002654. Since 10^(2*m)+1 is odd and has no prime factors of the form 4*r+3 the number of ways writing 10^(2*m)+1 as sum of 2 squares is just tau(10^(2*m)+1) (order matters). Since changing the order does not lead to a new solution (2*A-10^m is always the even square and 2*B-1 is always the odd square) and since the trivial 10^(2*m)+1 = (10^m)^2 + 1^2 leads to the ambiguous A = 0 and B = 1 there are only tau(10^(2*m)+1)/2-1 relevant ways. Because of the transformation from A to (10^m-A) every of these possibilities leads to a pair of solutions. So the number of solutions with 2*m digits is tau(10^(2*m)+1)-2, see A064943 %H A064942 IBM Corp., <a href="http://domino.research.ibm.com/Comm/wwwr_ponder.nsf/solutions/March2000.html">IBM March 2000 Challenge solution</a> %H A064942 C. Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_104.htm">Problem 104 of the prime puzzle pages with other approaches</a> %e A064942 8833 = 88^2 + 33^2, 5882353 = 0588^2 + 2353^2. %p A064942 with (numtheory): for m from 1 to 10 do: for i in sum2sqr(10^(2*m)+1) do: if i[1] > 1 and i[1] < 10^m then if type(i[1],odd) then a := (i[2]+10^m)/2: b := (i[1]+1)/2: else a := (i[1]+10^m)/2: b := (i[2]+1)/2: fi: print("Length =", 2*m, "Solution =", (10^m-a)*10^m+b): print(Length = 2*m, Solution = a*10^m+b): fi: od: od: %Y A064942 Cf. A064943 for the number of solutions, A055616 for the solutions where leading zeros are not allowed, A055617, A055618, A055619 for some infinite subsequences and A002654 for finding the number of ways writing an integer as sum of two squares. %Y A064942 A101311 is another version. %K A064942 nonn,base %O A064942 1,2 %A A064942 Ulrich Schimke (ulrschimke(AT)aol.com) %E A064942 Edited by _N. J. A. Sloane_, Jul 31 2007