login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A152439
Irregular triangle T(n, k) = (n-3)*(k-n)*(k-n-2) - (2*n-k)*(k-2), with 0 <= k <= 2*n.
2
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, 30, 9, -6, -15, -18, -15, -6, 9, 30, 168, 116, 72, 36, 8, -12, -24, -28, -24, -12, 8, 36, 72, 280, 205, 140, 85, 40, 5, -20, -35, -40, -35, -20, 5, 40, 85, 140
OFFSET
0,2
COMMENTS
Row sums are: {0, 1, 0, 7, 48, 165, 416, 875, 1632, 2793, 4480, ...}.
FORMULA
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.
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
EXAMPLE
Irregular triangle begins as:
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, 30, 9, -6, -15, -18, -15, -6, 9, 30;
168, 116, 72, 36, 8, -12, -24, -28, -24, -12, 8, 36, 72;
280, 205, 140, 85, 40, 5, -20, -35, -40, -35, -20, 5, 40, 85, 140;
MAPLE
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
MATHEMATICA
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[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 *)
PROG
(PARI) T(n, k) = (n-3)*(k-n)*(k-n-2) -(2*n-k)*(k-2); \\ G. C. Greubel, Dec 03 2019
(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
(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
(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
CROSSREFS
Cf. A152420.
Sequence in context: A164810 A322392 A089538 * A070965 A079548 A175620
KEYWORD
tabf,sign
AUTHOR
Roger L. Bagula, Dec 04 2008
EXTENSIONS
Edited by G. C. Greubel, Dec 03 2019
STATUS
approved