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.

A293944 Triangle read by rows related to Catalan triangle A009766.

Original entry on oeis.org

1, 1, 1, 2, 3, 2, 5, 9, 9, 5, 14, 28, 34, 28, 14, 42, 90, 123, 123, 90, 42, 132, 297, 440, 497, 440, 297, 132, 429, 1001, 1573, 1935, 1935, 1573, 1001, 429, 1430, 3432, 5642, 7397, 8068, 7397, 5642, 3432, 1430, 4862, 11934, 20332, 28014, 32636, 32636, 28014, 20332, 11934
Offset: 0

Views

Author

N. J. A. Sloane, Oct 21 2017

Keywords

Examples

			Triangle begins:
1,
1,1,
2,3,2,
5,9,9,5,
14,28,34,28,14,
42,90,123,123,90,42,
132,297,440,497,440,297,132,
...
		

Crossrefs

Cf. A009766, A000108 (1st column), A000245 (2nd column), A120989 (3rd), A090317 (row sums).

Programs

  • Maple
    A000108 := proc(q)
        if q <0 then
            0;
        else
            binomial(2*q,q)/(1+q) ;
        end if;
    end proc:
    R := proc(q,s)
        option remember;
        local a,j,l ;
        if q= 0 then
            A000108(s) ;
        elif s = 0 then
            A000108(q) ;
        else
            a := 0 ;
            for j from 0 to q do
                for l from 0 to s do
                    if j+l-1 >= 0 then
                        a := a+A000108(j+l-1) *procname(q-j,s-l) ;
                    end if;
                end do:
            end do:
        end if;
    end proc:
    A293944 := proc(n,k)
        R(n-k,k) ;
    end proc:
    seq(seq(A293944(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Nov 02 2017
  • Mathematica
    R[q_, s_] := R[q, s] = Module[{a, j, l}, If[q == 0, CatalanNumber[s], If[s == 0, CatalanNumber[q], a = 0; For[j = 0, j <= q, j++, For[l = 0, l <= s , l++, If[j + l - 1 >= 0, a = a + CatalanNumber[j + l - 1] R[q - j, s - l]] ]]]] /. Null -> a];
    T [n_, k_] := R[n - k, k];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 07 2020, after R. J. Mathar *)

Extensions

More terms from R. J. Mathar, Nov 02 2017