OFFSET
1,2
COMMENTS
The first column is A007526 = "the number of (nonnull) "variations" of n distinct objects, namely the number of permutations of nonempty subsets of {1,...,n}." E.g. for n=3 there are 15 subsets: {a}, {b}, {c}, {ab}, {ba}, {ac}, {ca}, {bc}, {cb}, {abc}, {acb}, {bac}, {bca}, {cab}, {cba}. These are subsets with a number of elements l=1,...,n. The second column excludes all subsets with l=n elements. For n=3 one has therefore only the 9 subsets {a}, {b}, {c}, {ab}, {ba}, {ac}, {ca}, {bc}, {cb}. The third column excludes all subsets with l>=n-1 elements. For n=3 one has therefore only the 3 subsets {a}, {b},{c}. See also A121684. The second column is A038156 = n!*Sum(1/k!, k=1..n-1). The first lower diagonal are the squares A000290 = n^2. The second lower diagonal (15, 40, 85...) is A053698 = n^3 + n^2 + n + 1. The row sum is A030297 = a(n) = n*(n+a(n-1)).
T(i, j) is the total number of ordered sets of size 1 to i-j+1 that can be created from i distinct items. - Manfred Boergens, Jun 22 2022
FORMULA
From Manfred Boergens, Jun 22 2022: (Start)
T(i, j) = Sum_{k=1..i-j+1} i!/(i-k)! = Sum_{k=j-1..i-1} i!/k!.
Sum-free formula: T(i, j) = b(i) - i!*b(j-1)/(j-1)! where b(0)=0, b(j)=floor(j!*e-1) for j>0.
(End)
EXAMPLE
Triangle T(i,j) begins:
1
4 2
15 9 3
64 40 16 4
325 205 85 25 5
1956 1236 516 156 36 6
13699 8659 3619 1099 259 49 7
...
MAPLE
T:= proc(i, j) option remember;
`if`(j<1 or j>i, 0, T(i-1, j)*i+i)
end:
seq(seq(T(n, k), k=1..n), n=1..10); # Alois P. Heinz, Jun 22 2022
MATHEMATICA
Table[Sum[m!/(m - i)!, {i, n}], {m, 9}, {n, m, 1, -1}] // Flatten (* Michael De Vlieger, Apr 22 2017 *)
(* Sum-free code *)
b[j_] = If[j == 0, 0, Floor[j! E - 1]];
T[i_, j_] = b[i] - i! b[j - 1]/(j - 1)!;
Table[T[i, j], {i, 24}, {j, i}] // Flatten
(* Manfred Boergens, Jun 22 2022 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Thomas Wieder, Aug 15 2006
EXTENSIONS
Edited by N. J. A. Sloane, Sep 15 2006
Formula in name corrected by Alois P. Heinz, Jun 22 2022
STATUS
approved