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.

A096587 Triangle read by rows: T(n,k)=number of Catalan knight paths in Quadrant I from (0,0) to (n,k), for 0 <= k <= 2*n, n >= 0. A Catalan knight moves (1 right and 2 up) or (1 right and 2 down) or (2 right and 1 up) or (2 right and 1 down).

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 2, 2, 0, 0, 1, 3, 3, 1, 2, 3, 3, 0, 0, 1, 2, 4, 9, 8, 3, 3, 4, 4, 0, 0, 1, 12, 12, 10, 11, 18, 15, 6, 4, 5, 5, 0, 0, 1, 14, 22, 42, 39, 27, 22, 30, 24, 10, 5, 6, 6, 0, 0, 1, 54, 61, 64, 72, 98, 87, 56, 38, 45, 35, 15, 6, 7, 7, 0, 0, 1, 86, 128, 213, 217, 181, 167
Offset: 0

Views

Author

Clark Kimberling, Jun 28 2004

Keywords

Examples

			Rows:
  1
  0 0 1
  1 1 0 0 1
  0 1 2 2 0 0 1
  ...
T(3,2) counts these paths: (0,0)-(1,2)-(2,0)-(3,2) and (0,0)-(1,2)-(2,4)-(3,2).
		

Crossrefs

Cf. A005220 (column 0), A005221 (column 1), A096588, A096608.

Programs

  • Mathematica
    A096587list[rowmax_]:=Module[{T},T[0,0]=1;T[n_,k_]:=T[n,k]=If[0<=k<=2n,T[n-1,k-2]+T[n-2,k-1]+T[n-1,k+2]+T[n-2,k+1],0];Table[T[n,k],{n,0,rowmax},{k,0,2n}]];A096587list[10] (* Generates 11 rows *) (* Paolo Xausa, May 22 2023 *)

Formula

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

Extensions

Offset changed to 0 by Paolo Xausa, May 22 2023