login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 11

%I #17 Jan 14 2020 08:27:25

%S 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 28,35,45,37,30,26,26,30,37,45,58,48,39,33,31,33,39,48,58,73,62,52,43,

%U 41,41,43,52,62,73,90,75,64,54,50,48,50,54,64,75,90

%N 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 Seen as a triangle:

%e [0] 1;

%e [1] 3, 3;

%e [2] 6, 4, 6;

%e [3] 11, 8, 8, 11;

%e [4] 17, 13, 9, 13, 17;

%e [5] 26, 19, 15, 15, 19, 26;

%e [6] 35, 28, 22, 20, 22, 28, 35;

%e [7] 45, 37, 30, 26, 26, 30, 37, 45;

%e [8] 58, 48, 39, 33, 31, 33, 39, 48, 58;

%e [9] 73, 62, 52, 43, 41, 41, 43, 52, 62, 73;

%p A048149 := proc(n, k) option remember; ## n = 0 .. infinity and k = 0 .. n

%p local x, y, radius, nTotal;

%p if n >= k then

%p radius := floor(sqrt(n^2 + k^2));

%p nTotal := 0;

%p for x from 0 to radius do

%p nTotal := nTotal + floor(sqrt(n^2 + k^2 - x^2)) + 1;

%p end do;

%p return nTotal;

%p else

%p return A048149(k, n);

%p end if;

%p end proc: # _Yu-Sheng Chang_, Jan 14 2020

%t 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 Cf. A000603 (right diagonal).

%K nonn,tabl

%O 0,2

%A _Clark Kimberling_

%E a(55) corrected by _Jean-François Alcover_, Nov 26 2013

%E a(55) restored by _Yu-Sheng Chang_, Jan 14 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:06 EDT 2024. Contains 371967 sequences. (Running on oeis4.)