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.

A002900 Number of n-step walks on square lattice.

Original entry on oeis.org

2, 6, 18, 50, 142, 390, 1086, 2958, 8134, 22050, 60146, 162466, 440750, 1187222, 3208298, 8622666, 23233338, 62329366, 167558310, 448848582, 1204403014, 3222280242, 8633306906, 23073198658, 61740677454, 164856393110, 440658745814
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A001411 is the main entry for this sequence.
Cf. A046661.

Programs

  • Mathematica
    (* b = A001411 *) mo = Tuples[{-1, 1}, 2]; b[0] = 1; b[tg_, p_:{{0, 0}}] := b[tg, p] = Block[{e, mv = Complement[Last[p] + #& /@ mo, p]}, If[tg == 1, Length[mv], Sum[b[tg-1, Append[p, e]], {e, mv}]]];
    a[n_] := b[n]/2;
    Table[an = a[n]; Print[an]; an, {n, 1, 16}] (* Jean-François Alcover, Nov 02 2018, after Giovanni Resta in A001411 *)

Formula

a(n) = (1/2) * A001411(n).

Extensions

More terms from Hugo Pfoertner, Dec 23 2002