This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A259787 #20 Jun 27 2022 07:50:42 %S A259787 1,5,31,270,3370,60146,1522031,54055976,2666453502,180847717069, %T A259787 16704822358932,2082808024263350,347639192485104658, %U A259787 77076883307827211845,22537752778732740525833,8633258320969387044105210,4305220991520242104331411368,2778601200692503839128415662124 %N A259787 Total element sum of all n X n Tesler matrices of nonnegative integers. %C A259787 For the definition of Tesler matrices see A008608. %H A259787 Alois P. Heinz, <a href="/A259787/b259787.txt">Table of n, a(n) for n = 1..21</a> %F A259787 a(n) = Sum_{k=0..n*(n-1)/2} (n+k) * A259786(n,k). %F A259787 a(n) = Sum_{k=0..n} k * A259841(n,k). %e A259787 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. %p A259787 b:= proc(n, i, l) option remember; (m-> `if`(m=0, [1, 0], `if`(i=0, %p A259787 (p-> p+[0, p[1]*(l[1]+1)])(b(l[1]+1, m-1, subsop(1=NULL, l))), %p A259787 add(b(n-j, i-1, subsop(i=l[i]+j, l)), j=0..n))))(nops(l)) %p A259787 end: %p A259787 a:= n-> (p-> p[1]+p[2])(b(1, n-1, [0$(n-1)])): %p A259787 seq(a(n), n=1..14); %t A259787 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]]; %t A259787 a[n_] := Function[p, p[[1]] + p[[2]]][b[1, n - 1, Table[0, {n - 1}]]]; %t A259787 Table[a[n], {n, 1, 14}] (* _Jean-François Alcover_, Jun 27 2022, after _Alois P. Heinz_ *) %Y A259787 Cf. A008608, A259786, A259841. %K A259787 nonn %O A259787 1,2 %A A259787 _Alois P. Heinz_, Jul 05 2015