A329750 Triangle read by rows where T(n,k) is the number of compositions of n >= 1 with runs-resistance n - k, 1 <= k <= n.
1, 1, 1, 2, 1, 1, 2, 3, 2, 1, 2, 6, 6, 1, 1, 0, 4, 9, 15, 3, 1, 0, 2, 16, 22, 22, 1, 1, 0, 0, 8, 37, 38, 41, 3, 1, 0, 0, 0, 26, 86, 69, 72, 2, 1, 0, 0, 0, 2, 78, 175, 124, 129, 3, 1, 0, 0, 0, 0, 14, 202, 367, 226, 213, 1, 1, 0, 0, 0, 0, 0, 52, 469, 750, 376, 395, 5, 1
Offset: 1
Examples
Triangle begins: 1 1 1 2 1 1 2 3 2 1 2 6 6 1 1 0 4 9 15 3 1 0 2 16 22 22 1 1 0 0 8 37 38 41 3 1 0 0 0 26 86 69 72 2 1 0 0 0 2 78 175 124 129 3 1 0 0 0 0 14 202 367 226 213 1 1 0 0 0 0 0 52 469 750 376 395 5 1 Row n = 6 counts the following compositions: (1,1,3,1) (1,1,4) (1,5) (3,3) (6) (1,3,1,1) (4,1,1) (2,4) (2,2,2) (1,1,1,2,1) (1,1,1,3) (4,2) (1,1,1,1,1,1) (1,2,1,1,1) (1,2,2,1) (5,1) (2,1,1,2) (1,2,3) (3,1,1,1) (1,3,2) (1,1,1,1,2) (1,4,1) (1,1,2,1,1) (2,1,3) (2,1,1,1,1) (2,3,1) (3,1,2) (3,2,1) (1,1,2,2) (1,2,1,2) (2,1,2,1) (2,2,1,1)
Crossrefs
Programs
-
Mathematica
runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1; Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],runsres[#]==n-k&]],{n,10},{k,n}]
Comments