login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A259787
Total element sum of all n X n Tesler matrices of nonnegative integers.
3
1, 5, 31, 270, 3370, 60146, 1522031, 54055976, 2666453502, 180847717069, 16704822358932, 2082808024263350, 347639192485104658, 77076883307827211845, 22537752778732740525833, 8633258320969387044105210, 4305220991520242104331411368, 2778601200692503839128415662124
OFFSET
1,2
COMMENTS
For the definition of Tesler matrices see A008608.
LINKS
FORMULA
a(n) = Sum_{k=0..n*(n-1)/2} (n+k) * A259786(n,k).
a(n) = Sum_{k=0..n} k * A259841(n,k).
EXAMPLE
There are two 2 X 2 Tesler matrices: [1,0; 0,1], [0,1; 0,2], the total sum of all elements gives a(2) = 5.
MAPLE
b:= proc(n, i, l) option remember; (m-> `if`(m=0, [1, 0], `if`(i=0,
(p-> p+[0, p[1]*(l[1]+1)])(b(l[1]+1, m-1, subsop(1=NULL, l))),
add(b(n-j, i-1, subsop(i=l[i]+j, l)), j=0..n))))(nops(l))
end:
a:= n-> (p-> p[1]+p[2])(b(1, n-1, [0$(n-1)])):
seq(a(n), n=1..14);
MATHEMATICA
b[n_, i_, l_] := b[n, i, l] = Function[m, If[m == 0, {1, 0}, If[i == 0, Function[p, p + {0, p[[1]]*(l[[1]] + 1)}][b[l[[1]] + 1, m - 1, ReplacePart[l, 1 -> Nothing]]], Sum[b[n - j, i - 1, ReplacePart[l, i -> l[[i]] + j]], {j, 0, n}]]]][Length[l]];
a[n_] := Function[p, p[[1]] + p[[2]]][b[1, n - 1, Table[0, {n - 1}]]];
Table[a[n], {n, 1, 14}] (* Jean-François Alcover, Jun 27 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 05 2015
STATUS
approved