OFFSET
0,5
COMMENTS
Row sums are: {1, 2, 8, 20, 134, 392, 3818, 12140, 155282, 518456, 8205362, ...}.
LINKS
G. C. Greubel, Rows n = 0..50 of the triangle, flattened
FORMULA
T(n, k) = n!*q^k/(n-k)! if floor(n/2) > k-1 otherwise n!*q^(n-k)/k!, with q = 3.
T(n, n-k) = T(n, k).
T(2*n, n) = A221954(n+1). - G. C. Greubel, Nov 28 2021
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 6, 1;
1, 9, 9, 1;
1, 12, 108, 12, 1;
1, 15, 180, 180, 15, 1;
1, 18, 270, 3240, 270, 18, 1;
1, 21, 378, 5670, 5670, 378, 21, 1;
1, 24, 504, 9072, 136080, 9072, 504, 24, 1;
1, 27, 648, 13608, 244944, 244944, 13608, 648, 27, 1;
1, 30, 810, 19440, 408240, 7348320, 408240, 19440, 810, 30, 1;
MATHEMATICA
T[n_, k_, q_]:= If[Floor[n/2]>=k, n!*q^k/(n-k)!, n!*q^(n-k)/k!];
Table[T[n, k, 3], {n, 0, 12}, {k, 0, n}]//Flatten
PROG
(Sage)
f=factorial
def T(n, k, q): return f(n)*q^k/f(n-k) if ((n//2)>k-1) else f(n)*q^(n-k)/f(k)
flatten([[T(n, k, 3) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Nov 28 2021
CROSSREFS
KEYWORD
AUTHOR
Roger L. Bagula, Mar 17 2010
EXTENSIONS
Edited by G. C. Greubel, Nov 28 2021
STATUS
approved