OFFSET
1,2
LINKS
Jeremy Dover, Table of n, a(n) for n = 1..1035
FORMULA
T(n, k) = (binomial(k,3) + 3*binomial(k,4)) * n! / (n+2-k)!.
T(n, k) = n*T(n-1,k-1) + (k-2)*A281881(n,k-1).
EXAMPLE
n=1 => AAA -> T(1,3)=1
n=2 => AAA,BBB -> T(2,3)=2
AAAB,AABA,ABAA,BAAA,BBBA,BBAB,BABB,ABBB,AABB,ABAB,ABBA,BAAB,BABA,BBAA -> T(2,4)=14
Triangle starts:
1
2, 14
3, 42, 150
4, 84, 600, 1560
5, 140, 1500, 7800, 16800
6, 210, 3000, 23400, 100800, 191520
7, 294, 5250, 54600, 352800, 1340640, 2328480
8, 392, 8400, 109200, 940800, 5362560, 18627840, 30240000
9, 504, 12600, 196560, 2116800, 16087680, 83825280, 272160000, 419126400
MATHEMATICA
Table[(Binomial[k, 3] + 3 Binomial[k, 4]) n!/(n + 2 - k)!, {n, 12}, {k, 3, n + 2}] // Flatten (* Michael De Vlieger, Feb 05 2017 *)
PROG
(PARI) T(n, k) = (binomial(k, 3) + 3*binomial(k, 4)) * n! / (n+2-k)!;
tabl(nn) = for (n=1, nn, for (k=3, n+2, print1(T(n, k), ", ")); print()); \\ Michel Marcus, Feb 04 2017
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Jeremy Dover, Feb 02 2017
STATUS
approved