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.

Showing 1-6 of 6 results.

A096608 Triangle read by rows: T(n,k)=number of Catalan knight paths in right half-plane from (0,0) to (n,k), for 0 <= k <= 2n, n >= 0. (See A096587 for the definition of a Catalan knight.)

Original entry on oeis.org

1, 0, 0, 1, 2, 1, 0, 0, 1, 0, 2, 3, 2, 0, 0, 1, 8, 6, 1, 3, 4, 3, 0, 0, 1, 6, 12, 16, 12, 3, 4, 5, 4, 0, 0, 1, 44, 33, 18, 21, 27, 20, 6, 5, 6, 5, 0, 0, 1, 60, 76, 95, 72, 40, 34, 41, 30, 10, 6, 7, 6, 0, 0, 1, 256, 210, 154, 155, 177, 135, 75, 52, 58, 42, 15, 7, 8, 7, 0, 0, 1, 460, 520, 581, 480
Offset: 0

Views

Author

Clark Kimberling, Jun 29 2004

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    A096608[rowmax_]:=Module[{T},T[0,0]=1;T[n_,k_]:=T[n,k]=If[k<=2n,T[n-1,Abs[k-2]]+T[n-2,Abs[k-1]]+T[n-1,k+2]+T[n-2,k+1],0];Table[T[n,k],{n,0,rowmax},{k,0,2n}]]; A096608[10] (* Generates 11 rows *) (* Paolo Xausa, May 09 2023 *)
  • PARI
    row(n) = { my (rr=0, r=1); for (k=1, n, [rr, r]=[r, r*(1+'X^4)+rr*('X^3+'X^5)]); Vec(r)[1+2*n..1+4*n] } \\ Rémy Sigrist, Jun 29 2022

Formula

T(0, 0) = 1, T(0, 1) = 0, T(0, 2) = 0; T(1, 0) = 0, T(1, 1) = 0, T(1, 2) = 1.
For n >= 2, T(n, 0) = 2*T(n-2, 1) + 2*T(n-1, 2); T(n, 1) = T(n-2, 0) + T(n-2, 2) + T(n-1, 3) + T(n-1, 1); for 2 <= k <= 2n, T(n, k) = T(n-2, k-1) + T(n-2, k+1) + T(n-1, k-2) + T(n-1, k+2).
T(n, 0) + 2*Sum_{k = 1..2*n} T(n, k) = A002605(k). - Rémy Sigrist, Jun 29 2022

Extensions

Offset changed to 0 by Rémy Sigrist, Jun 29 2022

A099328 Number of Catalan knight paths from (0,0) to (n,0) in the region between and on the lines y=0 and y=3. (See A096587 for the definition of Catalan knight.).

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 8, 8, 21, 28, 69, 108, 226, 370, 736, 1280, 2473, 4392, 8281, 14920, 27874, 50706, 94088, 171880, 317693, 582116, 1073853, 1970836, 3630914, 6669730, 12279296, 22568896, 41533777, 76360464, 140493041, 258344528, 475256898
Offset: 1

Views

Author

Clark Kimberling, Oct 12 2004

Keywords

Examples

			a(6) counts 8 paths from (0,0) to (6,0); the final move in 5 of the paths is from the point (5,2) and the final move in the other 3 paths is from (4,1).
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,1,-1,3,1,1,-1},{1,0,1,0,2,2,8},40] (* Harvey P. Dale, Aug 11 2017 *)

Formula

Taking A099328 to A099331 as the rows of an array T, the recurrences for these row sequences are given for n>=2 by T(n, 0) = T(n-1, 2) + T(n-2, 1), T(n, 1) = T(n-1, 3) + T(n-2, 0) + T(n-2, 2), T(n, 2) = T(n-1, 0) + T(n-2, 1) + T(n-2, 3), T(n, 3) = T(n-1, 1) + T(n-2, 2), with initial values T(0, 0)=1, T(1, 2)=1.
From Chai Wah Wu, Aug 09 2016: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) + 3*a(n-4) + a(n-5) + a(n-6) - a(n-7) for n > 7.
G.f.: x*(1 - x - 2*x^4)/((x^4 - 2*x^3 - 1)*(x^3 + x^2 + x - 1)). (End)
2*a(n) = A001590(n)-(-1)^n*( A052922(n-1)+A052922(n-3)) . - R. J. Mathar, Nov 22 2024

A099331 Number of Catalan knight paths from (0,0) to (n,3) in the region between and on the lines y=0 and y=3. (See A096587 for the definition of Catalan knight.).

Original entry on oeis.org

0, 0, 0, 2, 1, 4, 3, 12, 16, 40, 56, 122, 197, 408, 695, 1352, 2368, 4512, 8096, 15202, 27529, 51196, 93339, 172852, 316368, 584104, 1071160, 1974458, 3625613, 6677104, 12269359, 22583120, 41513728, 76387712, 140454656, 258398850, 475182353
Offset: 0

Views

Author

Clark Kimberling, Oct 12 2004

Keywords

Examples

			a(6) counts 3 paths from (0,0) to (6,3); the final move in 1
path is from (4,2) and the final move in the other 2 paths
is from (5,1).
		

Crossrefs

Formula

Taking A099328 to A099331 as the rows of an array T, the recurrences for these row sequences are given for n>=2 by T(n, 0) = T(n-1, 2) + T(n-2, 1), T(n, 1) = T(n-1, 3) + T(n-2, 0) + T(n-2, 2), T(n, 2) = T(n-1, 0) + T(n-2, 1) + T(n-2, 3), T(n, 3) = T(n-1, 1) + T(n-2, 2), with initial values T(0, 0)=1, T(1, 2)=1.
From Chai Wah Wu, Aug 09 2016: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) + 3*a(n-4) + a(n-5) + a(n-6) - a(n-7) for n > 6.
G.f.: x^3*(-x^2 + x - 2)/((-x^4 + 2*x^3 + 1)*(x^3 + x^2 + x - 1)). (End)

A099329 Number of Catalan knight paths from (0,0) to (n,1) in the region between and on the lines y=0 and y=3. (See A096587 for the definition of Catalan knight.).

Original entry on oeis.org

0, 0, 1, 1, 3, 2, 7, 10, 26, 38, 79, 127, 261, 452, 877, 1540, 2916, 5244, 9837, 17853, 33159, 60486, 111923, 204974, 378334, 694018, 1278939, 2348795, 4325129, 7948424, 14628953, 26893256, 49482888, 90987448, 167388697, 307825273
Offset: 1

Views

Author

Clark Kimberling, Oct 12 2004

Keywords

Examples

			a(6) counts 7 paths from (0,0) to (6,1); the final move in 4 of the paths is from the point (5,3), the final move in 1 path is from (4,2) and the final move in the other 3 paths is from (4,0).
		

Crossrefs

Formula

Taking A099328 to A099331 as the rows of an array T, the recurrences for these row sequences are given for n>=2 by T(n, 0) = T(n-1, 2) + T(n-2, 1), T(n, 1) = T(n-1, 3) + T(n-2, 0) + T(n-2, 2), T(n, 2) = T(n-1, 0) + T(n-2, 1) + T(n-2, 3), T(n, 3) = T(n-1, 1) + T(n-2, 2), with initial values T(0, 0)=1, T(1, 2)=1.
From Chai Wah Wu, Aug 09 2016: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) + 3*a(n-4) + a(n-5) + a(n-6) - a(n-7) for n > 7.
G.f.: x^3*(x^3 - x^2 - 1)/((-x^4 + 2*x^3 + 1)*(x^3 + x^2 + x - 1)). (End)

A099330 Number of Catalan knight paths from (0,0) to (n,2) in the region between and on the lines y=0 and y=3. (See A096587 for the definition of Catalan knight.).

Original entry on oeis.org

0, 1, 0, 1, 1, 5, 6, 14, 18, 43, 70, 147, 243, 475, 828, 1596, 2852, 5365, 9676, 18037, 32853, 60929, 111394, 205770, 377142, 695519, 1276818, 2351975, 4320935, 7954167, 14620472, 26904824, 49467208, 91010153, 167357080, 307868201
Offset: 1

Views

Author

Clark Kimberling, Oct 12 2004

Keywords

Examples

			a(6) counts 6 paths from (0,0) to (6,2); the final move in 1 path is from the point (4,3), the final move in 3 paths is from (4,1) and the final move in the other 2 paths is from (5,0).
		

Crossrefs

Formula

Taking A099328 to A099331 as the rows of an array T, the recurrences for these row sequences are given for n>=2 by T(n, 0) = T(n-1, 2) + T(n-2, 1), T(n, 1) = T(n-1, 3) + T(n-2, 0) + T(n-2, 2), T(n, 2) = T(n-1, 0) + T(n-2, 1) + T(n-2, 3), T(n, 3) = T(n-1, 1) + T(n-2, 2), with initial values T(0, 0)=1, T(1, 2)=1.
From Chai Wah Wu, Aug 09 2016: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) + 3*a(n-4) + a(n-5) + a(n-6) - a(n-7) for n > 7.
G.f.: -x^2*(x^3 - x + 1)/((-x^4 + 2*x^3 + 1)*(x^3 + x^2 + x - 1)). (End)

A096588 a(n)=number of Catalan knight paths in Quadrant I from (0,0) to points on the vertical line x=n. A Catalan knight moves (2 right and 1 up) or (1 right and 1 down).

Original entry on oeis.org

1, 1, 3, 6, 16, 38, 99, 248, 646, 1659, 4342, 11307, 29740, 78115, 206349, 545156, 1445332, 3834559, 10197168, 27140709, 72357778, 193076677, 515843630, 1379308111, 3691755414, 9888374480, 26507373732, 71103941488, 190859621124
Offset: 0

Views

Author

Clark Kimberling, Jun 28 2004

Keywords

Examples

			Rows of array T(n,k) in A096587:
  1
  0 0 1
  1 1 0 0 1
  0 1 2 2 0 0 1
  ...
so a(3)=T(3,0)+T(3,1)+...+T(3,6)=6.
		

Crossrefs

Cf. A096587.

Programs

  • Mathematica
    A096588list[nmax_]:=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[Sum[T[n,k],{k,0,2n}],{n,0,nmax}]];A096588list[50] (* Paolo Xausa, May 22 2023 *)

Formula

Row sums of array in A096587.
Showing 1-6 of 6 results.