A259841 Number T(n,k) of elements k in all n X n Tesler matrices of nonnegative integers; triangle T(n,k), n>=1, 1<=k<=n, read by rows.
1, 3, 1, 15, 5, 2, 117, 37, 17, 7, 1367, 418, 189, 100, 40, 23329, 7027, 3058, 1688, 939, 357, 570933, 171428, 72194, 39274, 24050, 13429, 4820, 19740068, 5948380, 2449366, 1293768, 807576, 517548, 283510, 96030
Offset: 1
Examples
There are two 2 X 2 Tesler matrices: [1,0; 0,1], [0,1; 0,2], containing three 1's and one 2, thus row 2 gives [3, 1]. Triangle T(n,k) begins: 1; 3, 1; 15, 5, 2; 117, 37, 17, 7; 1367, 418, 189, 100, 40; 23329, 7027, 3058, 1688, 939, 357; 570933, 171428, 72194, 39274, 24050, 13429, 4820; ...
Links
- Alois P. Heinz, Rows n = 1..20, flattened
Crossrefs
Programs
-
Maple
g:= u-> `if`(u=0, 0, x^u): b:= proc(n, i, l) option remember; (m->`if`(m=0, [1, g(n)], `if`(i=0, (p->p+[0, p[1]*g(n)])(b(l[1]+1, m-1, subsop(1=NULL, l))), add( (p->p+[0, p[1]*g(j)])(b(n-j, i-1, subsop(i=l[i]+j, l))) , j=0..n))))(nops(l)) end: T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(1,n-1,[0$(n-1)])[2]): seq(T(n), n=1..10);
-
Mathematica
g[u_] := If[u == 0, 0, x^u]; b[n_, i_, l_] := b[n, i, l] = Function[m, If[m == 0, {1, g[n]}, If[i == 0, # + {0, #[[1]] g[n]} & [b[l[[1]]+1, m-1, ReplacePart[l, 1 -> Nothing]]], Sum[# + {0, #[[1]] g[j]} & [b[n-j, i-1, ReplacePart[l, i -> l[[i]] + j]]], {j, 0, n}]]]][Length[l]]; T[n_] := Table[Coefficient[#, x, i], {i, 1, n}] & [b[1, n-1, Table[0, {n-1}]][[2]]]; Array[T, 10] // Flatten (* Jean-François Alcover, Oct 28 2020, after Maple *)
Comments