cp's OEIS Frontend

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.

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.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 28 2000

Keywords

Examples

			Rows begins as:
  1;
  1,  1;
  1,  2, 1;
  1,  5, 3, 1;
  1, 11, 9, 4, 1;
  ...
		

Crossrefs

Programs

  • 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
  • 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
    
  • 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 *)
  • 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
    
  • 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