login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A002900
Number of n-step walks on square lattice.
(Formerly M1621 N0634)
4
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,1
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).
LINKS
FORMULA
a(n) = (1/2) * A001411(n).
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 *)
CROSSREFS
A001411 is the main entry for this sequence.
Cf. A046661.
Sequence in context: A361286 A180282 A081154 * A309087 A199770 A204322
KEYWORD
nonn,walk
EXTENSIONS
More terms from Hugo Pfoertner, Dec 23 2002
STATUS
approved