A091613 Triangle: T(n,k) = number of compositions (ordered partitions) of n such that some part is repeated consecutively k times and no part is repeated consecutively more than k times.
1, 1, 1, 3, 0, 1, 4, 3, 0, 1, 7, 6, 2, 0, 1, 14, 10, 5, 2, 0, 1, 23, 23, 11, 4, 2, 0, 1, 39, 50, 22, 10, 4, 2, 0, 1, 71, 99, 48, 22, 9, 4, 2, 0, 1, 124, 200, 105, 46, 21, 9, 4, 2, 0, 1, 214, 404, 223, 101, 46, 20, 9, 4, 2, 0, 1, 378, 805, 468, 218, 98, 45, 20, 9, 4, 2, 0, 1, 661, 1599, 979, 466, 213, 98, 44, 20, 9, 4, 2, 0, 1
Offset: 1
Examples
Triangle starts: 1; 1, 1; 3, 0, 1; 4, 3, 0, 1; 7, 6, 2, 0, 1; 14, 10, 5, 2, 0, 1; 23, 23, 11, 4, 2, 0, 1; 39, 50, 22, 10, 4, 2, 0, 1; 71, 99, 48, 22, 9, 4, 2, 0, 1; 124, 200, 105, 46, 21, 9, 4, 2, 0, 1; ... In the partition 3+3+2+2+2+1+3+3+1, 2 is repeated consecutively 3 times, no part is repeated consecutively more than 3 times. (3 appears 4 times nonconsecutively.)
Links
- Alois P. Heinz, Rows n = 1..100, flattened
Crossrefs
Programs
-
Maple
b:= proc(n, l, k) option remember; `if`(n=0, 1, add(`if`( i=l, 0, add(b(n-i*j, i, k), j=1..min(k, n/i))), i=1..n)) end: T:= (n, k)-> b(n, 0, k)-b(n, 0, k-1): seq(seq(T(n, k), k=1..n), n=1..14); # Alois P. Heinz, Feb 08 2017
-
Mathematica
nn=15;Table[Take[Drop[Transpose[Map[PadRight[#,nn+1]&,Table[ CoefficientList[Series[1/(1-Sum[Sum[x^(j i),{i,1,k}]/Sum[x^(j i),{i,0,k}],{j,1,nn}])-1/(1-Sum[Sum[x^(j i),{i,1,k-1}]/Sum[x^(j i),{i,0,k-1}],{j,1,nn}]),{x,0,nn}],x],{k,1,nn}]]],1][[n]],n],{n,1,nn}]//Grid (* or *) Needs["Combinatorica`"];Table[Distribution[Map[Max,Map[Length,Map[Split, Level[Map[Permutations,IntegerPartitions[n,n]],{2}]],{2}]],Range[1,n]],{n,1,15}]//Grid (* Geoffrey Critzer, Mar 24 2014 *) b[n_, l_, k_] := b[n, l, k] = If[n == 0, 1, Sum[If[i == l, 0, Sum[b[n - i*j, i, k], {j, 1, Min[k, n/i]}]], {i, 1, n}]]; T[n_, k_] := b[n, 0, k] - b[n, 0, k - 1]; Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 04 2021, after Alois P. Heinz *)
Formula
G.f. for column k: 1/(1 - Sum_{i>=1} (x^i + x^(2*i) + ... + x^(k*i))/( 1 + x^i + x^(2*i) + ... + x^(k*i)) ) - 1/(1 - Sum_{i>=1} (x^i + x^(2*i) + ... + x^((k-1)*i))/( 1 + x^i + x^(2*i) + ... + x^((k-1)*i))). - Geoffrey Critzer, Mar 24 2014
Comments