login
Irregular triangle T(n, k) = (n-3)*(k-n)*(k-n-2) - (2*n-k)*(k-2), with 0 <= k <= 2*n.
2

%I #15 Sep 08 2022 08:45:39

%S 0,-2,1,2,0,0,0,0,0,12,5,0,-3,-4,-3,0,40,22,8,-2,-8,-10,-8,-2,8,90,57,

%T 30,9,-6,-15,-18,-15,-6,9,30,168,116,72,36,8,-12,-24,-28,-24,-12,8,36,

%U 72,280,205,140,85,40,5,-20,-35,-40,-35,-20,5,40,85,140

%N Irregular triangle T(n, k) = (n-3)*(k-n)*(k-n-2) - (2*n-k)*(k-2), with 0 <= k <= 2*n.

%C Row sums are: {0, 1, 0, 7, 48, 165, 416, 875, 1632, 2793, 4480, ...}.

%H G. C. Greubel, <a href="/A152439/b152439.txt">Rows n = 0..50 of triangle, flattened</a>

%F T(n, k) = 4*( (2*n-3)*k*(k-1) - n*(n-1) + k*(k-1)) = 4*( (2*n-3)*k*(k-1) - (n-k)*(n+k-1) ) with n and k ranging over half-integer steps.

%F T(n, k) = (n-3)*(k-n)*(k-n-2) - (2*n-k)*(k-2), with 0 <= k <= 2*n, n >= 0. - _G. C. Greubel_, Dec 03 2019

%e Irregular triangle begins as:

%e 0;

%e -2, 1, 2;

%e 0, 0, 0, 0, 0;

%e 12, 5, 0, -3, -4, -3, 0;

%e 40, 22, 8, -2, -8, -10, -8, -2, 8;

%e 90, 57, 30, 9, -6, -15, -18, -15, -6, 9, 30;

%e 168, 116, 72, 36, 8, -12, -24, -28, -24, -12, 8, 36, 72;

%e 280, 205, 140, 85, 40, 5, -20, -35, -40, -35, -20, 5, 40, 85, 140;

%p seq(seq( (n-3)*(k-n)*(k-n-2) -(2*n-k)*(k-2), k=0..2*n), n=0..10); # _G. C. Greubel_, Dec 03 2019

%t T[n_, k_]:= 4*((2*n-3)*k*(k-1) - (n-k)*(n+k-1)); Table[T[n, k], {n, 0, 5, 1/2}, {k, -n, n, 1/2}]//Flatten

%t T[n_, k_]:= (n-3)*(k-n)*(k-n-2) -(2*n-k)*(k-2); Table[T[n, k], {n, 0, 10}, {k, 0, 2*n}]//Flatten (* _G. C. Greubel_, Dec 03 2019 *)

%o (PARI) T(n,k) = (n-3)*(k-n)*(k-n-2) -(2*n-k)*(k-2); \\ _G. C. Greubel_, Dec 03 2019

%o (Magma) [(n-3)*(k-n)*(k-n-2) -(2*n-k)*(k-2): k in [0..2*n], n in [0..10]]; // _G. C. Greubel_, Dec 03 2019

%o (Sage) [[(n-3)*(k-n)*(k-n-2) -(2*n-k)*(k-2) for k in (0..2*n)] for n in (0..10)] # _G. C. Greubel_, Dec 03 2019

%o (GAP) Flat(List([0..10], n-> List([0..2*n], k-> (n-3)*(k-n)*(k-n-2) -(2*n-k)*(k-2) ))); # _G. C. Greubel_, Dec 03 2019

%Y Cf. A152420.

%K tabf,sign

%O 0,2

%A _Roger L. Bagula_, Dec 04 2008

%E Edited by _G. C. Greubel_, Dec 03 2019