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.

A052178 Number of walks of length n on the simple cubic lattice terminating at height 2 above the (x,y)-plane.

Original entry on oeis.org

1, 12, 99, 700, 4569, 28476, 172508, 1026288, 6033690, 35195512, 204232809, 1181052756, 6814746393, 39267916380, 226097749224, 1301403695520, 7490649175326, 43123589230824, 248351880642630, 1430956006648056, 8249467230853002, 47587180659332248
Offset: 2

Views

Author

N. J. A. Sloane, Jan 26 2000

Keywords

Crossrefs

Column 2 of A052179.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(min(n, k)<0, 0,
         `if`(max(n, k)=0, 1, b(n-1, k-1)+4*b(n-1, k)+b(n-1, k+1)))
        end:
    a:= n-> b(n, 2):
    seq(a(n), n=2..25);  # Alois P. Heinz, Oct 28 2021
  • Mathematica
    b[n_, k_] := b[n, k] = If[Min[n, k] < 0, 0, If[Max[n, k] == 0, 1, b[n - 1, k - 1] + 4*b[n - 1, k] + b[n - 1, k + 1]]];
    a[n_] :=  b[n, 2];
    Table[a[n], {n, 2, 25}] (* Jean-François Alcover, Jan 07 2025, after Alois P. Heinz *)

Extensions

More terms and title improved by Sean A. Irvine, Oct 28 2021