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-3 of 3 results.

A127617 Number of walks from (0,0) to (n,n) in the region 0 <= x-y <= 3 with the steps (1,0), (0, 1), (2,0) and (0,2).

Original entry on oeis.org

1, 1, 5, 22, 92, 395, 1684, 7189, 30685, 130973, 559038, 2386160, 10184931, 43472696, 185556025, 792015257, 3380586357, 14429474710, 61589830404, 262886022219, 1122085581740, 4789437042413, 20442921249973, 87257234103245, 372443097062686, 1589711867161816
Offset: 0

Views

Author

Arvind Ayyer, Jan 20 2007

Keywords

Examples

			a(2)=5 because we can reach (2,2) in the following ways:
(0,0),(1,0),(1,1),(2,1),(2,2)
(0,0),(2,0),(2,2)
(0,0),(1,0),(2,0),(2,2)
(0,0),(2,0),(2,1),(2,2)
(0,0),(1,0),(2,0),(2,1),(2,2)
		

Crossrefs

Programs

  • Magma
    I:=[1,1,5,22]; [n le 4 select I[n] else 3*Self(n-1)+5*Self(n-2)+2*Self(n-3)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 13 2018
  • Maple
    seq(coeff(series((1-2*x-3*x^2)/(1-3*x-5*x^2-2*x^3+x^4),x,n+1), x, n), n = 0 .. 25); # Muniru A Asiru, Dec 10 2018
  • Mathematica
    LinearRecurrence[{3, 5, 2, -1}, {1, 1, 5, 22}, 23] (* Jean-François Alcover, Dec 10 2018 *)
    CoefficientList[Series[(1 - 2 x - 3 x^2) / (1 - 3 x - 5 x^2 - 2 x^3 + x^4), {x, 0, 33}], x] (* Vincenzo Librandi, Dec 13 2018 *)
    b[n_, k_] := Boole[n >= 0 && k >= 0 && 0 <= n-k <= 3];
    T[0, 0] = T[1, 1] = 1; T[n_, k_] /; b[n, k] == 1 := T[n, k] = b[n-2, k]* T[n-2, k] + b[n-1, k]*T[n-1, k] + b[n, k-2]*T[n, k-2] + b[n, k-1]*T[n, k-1]; T[, ] = 0;
    a[n_] := T[n, n];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 03 2019 *)

Formula

G.f.: (1 - 2*x - 3*x^2) / (1 - 3*x - 5*x^2 - 2*x^3 + x^4).
a(n) = 3*a(n-1)+5*a(n-2)+2*a(n-3)-a(n-4). - Vincenzo Librandi, Dec 13 2018

A127618 Number of walks from (0,0) to (n,n) in the region 0 <= x-y <= 4 with the steps (1,0), (0, 1), (2,0) and (0,2).

Original entry on oeis.org

1, 1, 5, 22, 117, 590, 3018, 15378, 78440, 399992, 2039852, 10402480, 53049048, 270531368, 1379614800, 7035549312, 35878823312, 182969359520, 933079279328, 4758375627808, 24266039468160, 123748253080832, 631072497876672
Offset: 0

Views

Author

Arvind Ayyer, Jan 20 2007

Keywords

Examples

			a(2)=5 because we can reach (2,2) in the following ways:
(0,0),(1,0),(1,1),(2,1),(2,2)
(0,0),(2,0),(2,2)
(0,0),(1,0),(2,0),(2,2)
(0,0),(2,0),(2,1),(2,2)
(0,0),(1,0),(2,0),(2,1),(2,2)
		

Crossrefs

Programs

  • Mathematica
    Join[{1, 1}, LinearRecurrence[{4, 6, -2}, {5, 22, 117}, 21]] (* Jean-François Alcover, Dec 10 2018 *)
    b[n_, k_] := Boole[n >= 0 && k >= 0 && 0 <= n-k <= 4];
    T[0, 0] = T[1, 1] = 1; T[n_, k_] /; b[n, k] == 1 := T[n, k] = b[n-2, k]* T[n-2, k] + b[n-1, k]*T[n-1, k] + b[n, k-2]*T[n, k-2] + b[n, k-1]*T[n, k-1]; T[, ] = 0;
    a[n_] := T[n, n];
    Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Apr 03 2019 *)

Formula

G.f.: (1-3x-5x^2-2x^3+x^4)/(1-4x-6x^2+2x^3).

A127619 Number of walks from (0,0) to (n,n) in the region 0 <= x-y <= 5 with the steps (1,0), (0, 1), (2,0) and (0,2).

Original entry on oeis.org

1, 1, 5, 22, 117, 654, 3674, 20763, 117349, 663529, 3751874, 21215245, 119963514, 678345474, 3835772387, 21689760681, 122646936325, 693519457822, 3921575652821, 22174944672838, 125390459051898, 709032985366923
Offset: 0

Views

Author

Arvind Ayyer, Jan 20 2007

Keywords

Examples

			a(2)=5 because we can reach (2,2) in the following ways:
(0,0),(1,0),(1,1),(2,1),(2,2)
(0,0),(2,0),(2,2)
(0,0),(1,0),(2,0),(2,2)
(0,0),(2,0),(2,1),(2,2)
(0,0),(1,0),(2,0),(2,1),(2,2)
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5, 6, -11, -12, 4}, {1, 1, 5, 22, 117}, 22] (* Jean-François Alcover, Dec 10 2018 *)
    b[n_, k_] := Boole[n >= 0 && k >= 0 && 0 <= n - k <= 5];
    T[0, 0] = T[1, 1] = 1; T[n_, k_] /; b[n, k] == 1 := T[n, k] = b[n-2, k]* T[n-2, k] + b[n-1, k]*T[n-1, k] + b[n, k-2]*T[n, k-2] + b[n, k-1]*T[n, k-1]; T[, ] = 0;
    a[n_] := T[n, n];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Apr 03 2019 *)

Formula

G.f.: (1-4x-6x^2+2x^3)/(1-5x-6x^2+11x^3+12x^4-4x^5). [Typo corrected by Jean-François Alcover, Dec 10 2018]
Showing 1-3 of 3 results.