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”).

A055818
Triangle T read by rows: T(i,j) = R(i-j,j), where R(i,0) = R(0,i) = 1 for i >= 0, R(i,j) = Sum_{h=0..i-1} Sum_{m=0..j} R(h,m) for i >= 1, j >= 1.
13
1, 1, 1, 1, 2, 1, 1, 5, 3, 1, 1, 11, 9, 4, 1, 1, 23, 24, 14, 5, 1, 1, 47, 60, 43, 20, 6, 1, 1, 95, 144, 122, 69, 27, 7, 1, 1, 191, 336, 328, 217, 103, 35, 8, 1, 1, 383, 768, 848, 640, 354, 146, 44, 9, 1, 1, 767, 1728, 2128, 1800, 1131, 543, 199, 54, 10, 1
OFFSET
0,5
LINKS
Clark Kimberling, Path-counting and Fibonacci numbers, Fib. Quart. 40 (4) (2002) 328-338, Example 3B.
EXAMPLE
Rows begins as:
1;
1, 1;
1, 2, 1;
1, 5, 3, 1;
1, 11, 9, 4, 1;
...
MAPLE
T:= proc(i, j) option remember;
if i=0 or j=0 then 1
else add(add(T(h, m), m=0..j), h=0..i-1)
fi; end:
seq(seq(T(n-k, k), k=0..n), n=0..12); # G. C. Greubel, Jan 21 2020
MATHEMATICA
T[i_, j_]:= T[i, j]= If[i==0 || j==0, 1, Sum[T[h, m], {h, 0, i-1}, {m, 0, j}]]; Table[T[n-k, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Jan 21 2020 *)
PROG
(PARI) T(i, j) = if(i==0 || j==0, 1, sum(h=0, i-1, sum(m=0, j, T(h, m) )));
for(n=0, 12, for(k=0, n, print1(T(n-k, k), ", "))) \\ G. C. Greubel, Jan 21 2020
(Magma)
function T(i, j)
if i eq 0 or j eq 0 then return 1;
else return (&+[(&+[T(h, m): m in [0..j]]): h in [0..i-1]]);
end if; return T; end function;
[T(n-k, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 21 2020
(Sage)
@CachedFunction
def T(i, j):
if (i==0 or j==0): return 1
else: return sum(sum(T(h, m) for m in (0..j)) for h in (0..i-1))
[[T(n-k, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jan 21 2020
(GAP)
T:= function(i, j)
if i=0 or j=0 then return 1;
else return Sum([0..i-1], h-> Sum([0..j], m-> T(h, m) ));
fi; end;
Flat(List([0..12], n-> List([0..n], k-> T(n-k, k) ))); # G. C. Greubel, Jan 21 2020
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, May 28 2000
STATUS
approved