A048887 Array T read by antidiagonals, where T(m,n) = number of compositions of n into parts <= m.
1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 4, 5, 1, 1, 2, 4, 7, 8, 1, 1, 2, 4, 8, 13, 13, 1, 1, 2, 4, 8, 15, 24, 21, 1, 1, 2, 4, 8, 16, 29, 44, 34, 1, 1, 2, 4, 8, 16, 31, 56, 81, 55, 1, 1, 2, 4, 8, 16, 32, 61, 108, 149, 89, 1, 1, 2, 4, 8, 16, 32, 63, 120, 208, 274, 144, 1
Offset: 1
Examples
T(2,5) counts 11111, 1112, 1121, 1211, 2111, 122, 212, 221, where "1211" abbreviates the composition 1+2+1+1. These eight compositions correspond respectively to: {0,0,0,0}, {0,0,0,1}, {0,0,1,0}, {0,1,0,0}, {1,0,0,0}, {0,1,0,1}, {1,0,0,1}, {1,0,1,0} per the bijection given by _N. J. A. Sloane_ in A048004. - _Geoffrey Critzer_, Sep 02 2012 The array begins: 1, 1, 1, 1, 1, 1, 1, ... 1, 2, 3, 5, 8, 13, ... 1, 2, 4, 7, 13, ... 1, 2, 4, 8, ... 1, 2, 4, ... 1, 2, ... 1, ...
References
- J. Riordan, An Introduction to Combinatorial Analysis, Princeton University Press, Princeton, NJ, 1978, p. 154.
Links
- Alois P. Heinz, Antidiagonals n = 1..141, flattened
- Hsin-Po Wang and Chi-Wei Chin, On Counting Subsequences and Higher-Order Fibonacci Numbers, arXiv:2405.17499 [cs.IT], 2024. See p. 2.
Crossrefs
Programs
-
Maple
G := t->(1-z)/(1-2*z+z^(t+1)): T := (m,n)->coeff(series(G(m),z=0,30),z^n): matrix(7,12,T); # second Maple program: T:= proc(m, n) option remember; `if`(n=0 or m=1, 1, add(T(m, n-j), j=1..min(n, m))) end: seq(seq(T(1+d-n, n), n=1..d), d=1..14); # Alois P. Heinz, May 21 2013
-
Mathematica
Table[nn=10;a=(1-x^k)/(1-x);b=1/(1-x);c=(1-x^(k-1))/(1-x); CoefficientList[ Series[a b/(1-x^2 b c), {x,0,nn}],x],{k,1,nn}]//Grid (* Geoffrey Critzer, Sep 02 2012 *) T[m_, n_] := T[m, n] = If[n == 0 || m == 1, 1, Sum[T[m, n-j], {j, 1, Min[n, m]}]]; Table[Table[T[1+d-n, n], {n, 1, d}], {d, 1, 14}] // Flatten (* Jean-François Alcover, Nov 12 2014, after Alois P. Heinz *)
Formula
G.f.: (1-z)/[1-2z+z^(t+1)].
Comments