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”).

A172176
Triangle T(n, k) = 1 + (n + k - n*k)*(2*n - k - n*(n-k)), read by rows.
1
1, 2, 2, 1, 2, 1, -8, 0, 0, -8, -31, -4, 5, -4, -31, -74, -10, 22, 22, -10, -74, -143, -18, 57, 82, 57, -18, -143, -244, -28, 116, 188, 188, 116, -28, -244, -383, -40, 205, 352, 401, 352, 205, -40, -383, -566, -54, 330, 586, 714, 714, 586, 330, -54, -566
OFFSET
0,2
FORMULA
T(n, k) = 1 + (n-(n-1)*k)*(n-(n-1)*(n-k)).
T(n, n-k) = T(n, k).
T(n, 0) = 1 - A027620(n-3).
T(n, 1) = -A028552(n-3).
T(n, 2) = A033445(n-2).
Sum_{k=0..n} T(n, k) = (n+1)*(n^4 - 9*n^3 + 15*n^2 - n + 6)/6.
EXAMPLE
Triangle begins as:
1;
2, 2;
1, 2, 1;
-8, 0, 0, -8;
-31, -4, 5, -4, -31;
-74, -10, 22, 22, -10, -74;
-143, -18, 57, 82, 57, -18, -143;
-244, -28, 116, 188, 188, 116, -28, -244;
-383, -40, 205, 352, 401, 352, 205, -40, -383;
-566, -54, 330, 586, 714, 714, 586, 330, -54, -566;
-799, -70, 497, 902, 1145, 1226, 1145, 902, 497, -70, -799;
MAPLE
A172176:= proc(n, m) 1+(n+m-n*m)*(2*n-m-n*(n-m)); end proc:
seq(seq(A172176(n, m), m=0..n), n=0..12);
MATHEMATICA
T[n_, k_]= 1 + (n-(n-1)*k)*(n-(n-1)*(n-k));
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten
PROG
(Magma) [1 + (n-(n-1)*k)*(n-(n-1)*(n-k)): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 26 2022
(SageMath)
def A172176(n, k): return 1 + (n-(n-1)*k)*(n-(n-1)*(n-k))
flatten([[A172176(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 26 2022
CROSSREFS
KEYWORD
sign,tabl,easy
AUTHOR
Roger L. Bagula, Jan 28 2010
STATUS
approved