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.

A294207 Triangle read by rows: T(n,k) is the number of lattice paths from (0,0) to (n,k), 0 <= 3k <= 2n, that are below the line 3y=2x, only touching at the end points.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 1, 3, 3, 1, 4, 7, 7, 1, 5, 12, 19, 19, 1, 6, 18, 37, 37, 1, 7, 25, 62, 99, 99, 1, 8, 33, 95, 194, 293, 293, 1, 9, 42, 137, 331, 624, 624, 1, 10, 52, 189, 520, 1144, 1768, 1768, 1, 11, 63, 252, 772, 1916, 3684, 5452, 5452
Offset: 0

Views

Author

Danny Rorabaugh, Oct 24 2017

Keywords

Examples

			The table begins:
n=0: 1;
n=1: 1;
n=2: 1, 1;
n=3: 1, 2,  2;
n=4: 1, 3,  3;
n=5: 1, 4,  7,  7;
n=6: 1, 5, 12, 19,  19;
n=7: 1, 6, 18, 37,  37;
n=8: 1, 7, 25, 62,  99,  99;
n=9: 1, 8, 33, 95, 194, 293, 293.
		

Crossrefs

Programs

  • Mathematica
    T[, 0] = 1; T[n, k_] := T[n, k] = Which[0 < k < 2(n-1)/3, T[n-1, k] + T[n, k-1], 2(n-1) <= 3k <= 2n, T[n, k-1]];
    Table[T[n, k], {n, 0, 15}, {k, 0, Floor[2n/3]}] // Flatten (* Jean-François Alcover, Jul 10 2018 *)
  • Sage
    T = [[1]]
    for n in range(1,15):
        T.append([T[-1][0]])
        for k in range(1,floor(2*n/3) + 1):
            T[-1].append(T[-1][k-1])
            if 2*(n-1)>3*k:
                T[-1][-1] += T[-2][k]

Formula

T(n,0) = 1; for 0 < k < 2(n-1)/3, T(n,k) = T(n-1,k) + T(n,k-1); for 2(n-1) <= 3k <= 2n, T(n,k) = T(n,k-1).