|
|
A129821
|
|
Triangle read by rows: T(n, k) = (n-k)^n - n*k*(n-k) + k^n, with T(0, 0) = 1.
|
|
1
|
|
|
1, 1, 1, 4, 0, 4, 27, 3, 3, 27, 256, 70, 16, 70, 256, 3125, 1005, 245, 245, 1005, 3125, 46656, 15596, 4112, 1404, 4112, 15596, 46656, 823543, 279895, 78183, 18487, 18487, 78183, 279895, 823543, 16777216, 5764746, 1679776, 397066, 130944, 397066
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
LINKS
|
|
|
FORMULA
|
T(n, k) = (n-k)^n - n*k*(n-k) + k^n, with T(0, 0) = 1.
T(n, n-k) = T(n, k).
|
|
EXAMPLE
|
Triangle begins as:
1;
1, 1;
4, 0, 4;
27, 3, 3, 27;
256, 70, 16, 70, 256;
3125, 1005, 245, 245, 1005, 3125;
46656, 15596, 4112, 1404, 4112, 15596, 46656;
|
|
MATHEMATICA
|
T[n_, k_]= If[n==0, 1, k^n +(n-k)^n -n*k*(n-k)];
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten
|
|
PROG
|
(Magma)
[n eq 0 select 1 else (n-k)^n - n*k*(n-k) + k^n: k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 26 2024
(SageMath)
flatten([[(n-k)^n - n*k*(n-k) + k^n - int(n==0) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Apr 26 2024
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|