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 A048149 #17 Jan 14 2020 08:27:25 %S A048149 1,3,3,6,4,6,11,8,8,11,17,13,9,13,17,26,19,15,15,19,26,35,28,22,20,22, %T A048149 28,35,45,37,30,26,26,30,37,45,58,48,39,33,31,33,39,48,58,73,62,52,43, %U A048149 41,41,43,52,62,73,90,75,64,54,50,48,50,54,64,75,90 %N A048149 Array T read by diagonals: T(i,j) = number of pairs (h,k) with h^2+k^2 <= i^2+j^2, h>=0, k >= 0. %e A048149 Seen as a triangle: %e A048149 [0] 1; %e A048149 [1] 3, 3; %e A048149 [2] 6, 4, 6; %e A048149 [3] 11, 8, 8, 11; %e A048149 [4] 17, 13, 9, 13, 17; %e A048149 [5] 26, 19, 15, 15, 19, 26; %e A048149 [6] 35, 28, 22, 20, 22, 28, 35; %e A048149 [7] 45, 37, 30, 26, 26, 30, 37, 45; %e A048149 [8] 58, 48, 39, 33, 31, 33, 39, 48, 58; %e A048149 [9] 73, 62, 52, 43, 41, 41, 43, 52, 62, 73; %p A048149 A048149 := proc(n, k) option remember; ## n = 0 .. infinity and k = 0 .. n %p A048149 local x, y, radius, nTotal; %p A048149 if n >= k then %p A048149 radius := floor(sqrt(n^2 + k^2)); %p A048149 nTotal := 0; %p A048149 for x from 0 to radius do %p A048149 nTotal := nTotal + floor(sqrt(n^2 + k^2 - x^2)) + 1; %p A048149 end do; %p A048149 return nTotal; %p A048149 else %p A048149 return A048149(k, n); %p A048149 end if; %p A048149 end proc: # _Yu-Sheng Chang_, Jan 14 2020 %t A048149 t[i_, j_] := Module[{h, k}, Reduce[h^2 + k^2 <= i^2 + j^2 && h >= 0 && k >= 0, {h, k}, Integers] // ToRules // Length[{##}]&]; Table[t[n-k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Nov 26 2013 *) %Y A048149 Cf. A000603 (right diagonal). %K A048149 nonn,tabl %O A048149 0,2 %A A048149 _Clark Kimberling_ %E A048149 a(55) corrected by _Jean-François Alcover_, Nov 26 2013 %E A048149 a(55) restored by _Yu-Sheng Chang_, Jan 14 2020