OFFSET
0,5
FORMULA
If m < 0 or m > n then T(n, m) = 0; if m = 0 or m = n then T(n, m) = 1; otherwise T(n, m) = Sum( T(n-i, m-i), i=1..m) + Sum( T(n-i, m), i=1..n-m) + Sum( T(n-m-i, 0), i=1..n-m) + Sum( T(i, i), i=1..m-1).
The U-coordinates are nicer. Label the elements U(0, 0), U(1, 0), U(0, 1), U(2, 0), U(1, 1), U(0, 2), ...
Then U(n, 0) = U(0, m) = 1; for n>=1, m>=1, U(n, m) = Sum_{i=0..n-1} U(i, 0) + Sum_{j=0..m-1} U(0, j) - U(0, 0) + Sum_{j=0..m-1} U(n, j) + Sum_{i=0..n-1} U(i, m). Hence U(z, w) = Sum U(n, m) z^n w^m = (1-2*z-2*w+5*z*w-2*z^2*w^2)/((1-z)*(1-w)*(1-2*z-2*w+3*z*w)). - N. J. A. Sloane, Jun 16 2005
EXAMPLE
The triangle begins:
..........1
........1...1
......1...3...1
....1...7...7...1
..1..15..19...15..1
E.g. 19 = 7 + 1 + 1 + 1 + 1 + 1 + 7.
MAPLE
T:=proc(n, m) option remember; local i, j, k, t1, t2, t3; if m < 0 or m > n then RETURN(0); fi; if m = 0 or m = n then RETURN(1); fi; add( T(n-i, m-i), i=1..m) + add( T(n-i, m), i=1..n-m) + add( T(n-m-i, 0), i=1..n-m) + add( T(i, i), i=1..m-1); end;
U:=(1-2*z-2*w+5*z*w-2*z^2*w^2)/(1-z)/(1-w)/(1-2*z-2*w+3*z*w);
CROSSREFS
KEYWORD
AUTHOR
Floor van Lamoen, Jul 16 2001
EXTENSIONS
Entry revised by N. J. A. Sloane, Jun 15 2005
a(51)=2111 corrected by Georg Fischer, Jul 29 2020
STATUS
approved