OFFSET
1,2
COMMENTS
For the definition of Tesler matrices see A008608.
FORMULA
a(n) = Sum_{k=1..n} A259841(n,k).
EXAMPLE
There are two 2 X 2 Tesler matrices: [1,0; 0,1], [0,1; 0,2], containing four nonzero elements, thus a(2) = 4.
MAPLE
g:= u-> `if`(u=0, 0, 1):
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:
a:= n-> b(1, n-1, [0$(n-1)])[2]:
seq(a(n), n=1..14);
MATHEMATICA
g[u_] := If[u == 0, 0, 1];
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]];
a[n_] := b[1, n - 1, Table[0, {n - 1}]][[2]];
Table[Print[n, " ", a[n]]; a[n], {n, 1, 18}] (* Jean-François Alcover, May 15 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 06 2015
STATUS
approved