A055216 Triangle T(n,k) by rows, n >= 0, 0<=k<=n: T(n,k) = Sum_{i=0..n-k} binomial(n-k,i) *Sum_{j=0..k-i} binomial(i,j).
1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 3, 1, 1, 5, 10, 8, 3, 1, 1, 6, 15, 17, 9, 3, 1, 1, 7, 21, 31, 23, 9, 3, 1, 1, 8, 28, 51, 50, 26, 9, 3, 1, 1, 9, 36, 78, 96, 66, 27, 9, 3, 1, 1, 10, 45, 113, 168, 147, 76, 27, 9, 3, 1, 1, 11, 55, 157, 274, 294, 192, 80, 27, 9, 3, 1
Offset: 0
Examples
8=T(5,2) counts these strings: 013, 023, 113, 123, 133, 223, 233, 333. Rows: 1; 1,1; 1,2,1; 1,3,3,1; 1,4,6,3,1; ...
Links
- D. S. Hirschberg, Algorithms for the longest subsequence problem, J. ACM, 24 (1977), 664-675.
- C. Kimberling, Path-counting and Fibonacci numbers, Fib. Quart. 40 (4) (2002) 328-338, Example 1E.
- V. I. Levenshtein, Efficient reconstruction of sequences from their subsequences or supersequences, J. Combin. Theory Ser. A 93 (2001), no. 2, 310-332.
Programs
-
Maple
A055216 := proc(n,k) a := 0 ; for i from 0 to n-k do a := a+binomial(n-k,i)*add(binomial(i,j),j=0..k-i) ; end do: a ; end proc: # R. J. Mathar, Mar 13 2013
-
Mathematica
T[n_, k_] := Sum[Binomial[n - k, i]*Sum[Binomial[i, j], {j, 0, k - i}], {i, 0, n - k}]; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Oct 28 2019 *)
Formula
T(i, 0)=T(i, i)=1 for i >= 0; T(i, 1)=T(i, i-1)=i for i >= 2; T(i, j)=T(i-1, j)+T(i-2, j-1)+T(i-3, j-2) for 2<=j<=i-2, i >= 3.
Extensions
Better description and references from N. J. A. Sloane, Aug 05 2000
Comments