login
A176293
Triangle T(n,k) = 1 + 2*k*(n-k)*(n-1)^2, read by rows.
1
1, 1, 1, 1, 3, 1, 1, 17, 17, 1, 1, 55, 73, 55, 1, 1, 129, 193, 193, 129, 1, 1, 251, 401, 451, 401, 251, 1, 1, 433, 721, 865, 865, 721, 433, 1, 1, 687, 1177, 1471, 1569, 1471, 1177, 687, 1, 1, 1025, 1793, 2305, 2561, 2561, 2305, 1793, 1025, 1, 1, 1459, 2593, 3403, 3889, 4051, 3889, 3403, 2593, 1459, 1
OFFSET
0,5
COMMENTS
Row sums are {1, 2, 5, 36, 185, 646, 1757, 4040, 8241, 15370, 26741, ...} = (n+1)*(n^4 - 3*n^3 + 3*n^2 - n + 3)/3.
FORMULA
T(n,k) = T(n,n-k) = 1 - (-n^2 - n^4 + (n*k + n - k)^2 + (k + n*(n - k))^2).
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 3, 1;
1, 17, 17, 1;
1, 55, 73, 55, 1;
1, 129, 193, 193, 129, 1;
1, 251, 401, 451, 401, 251, 1;
1, 433, 721, 865, 865, 721, 433, 1;
1, 687, 1177, 1471, 1569, 1471, 1177, 687, 1;
1, 1025, 1793, 2305, 2561, 2561, 2305, 1793, 1025, 1;
1, 1459, 2593, 3403, 3889, 4051, 3889, 3403, 2593, 1459, 1;
MAPLE
seq(seq(1 + 2*k*(n-k)*(n-1)^2, k=0..n), n=0..12); # G. C. Greubel, Nov 25 2019
MATHEMATICA
T[n_, k_]:= 1 -(-n^2 -n^4 +(n*k+n-k)^2 +(k +n(n-k))^2); Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten
PROG
(PARI) T(n, k) = 1 + 2*k*(n-k)*(n-1)^2; \\ G. C. Greubel, Nov 25 2019
(Magma) [1 + 2*k*(n-k)*(n-1)^2: k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 25 2019
(Sage) [[1 + 2*k*(n-k)*(n-1)^2 for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 25 2019
(GAP) Flat(List([0..12], n-> List([0..n], k-> 1 + 2*k*(n-k)*(n-1)^2 ))); # G. C. Greubel, Nov 25 2019
CROSSREFS
Sequence in context: A290311 A322790 A333560 * A176339 A121412 A212855
KEYWORD
nonn,tabl,easy
AUTHOR
Roger L. Bagula, Apr 14 2010
EXTENSIONS
Edited by R. J. Mathar, May 04 2013
STATUS
approved