OFFSET
0,2
COMMENTS
Nonnegative walks with n steps on the x-axis starting at the origin using steps {1,0,-1} and visiting no point more than twice. Note: a 0 step counts as a visit and a step but does not contribute to the length of the walk. - David Scambler, May 22 2012
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2000 (first 500 terms from R. H. Hardin)
Index entries for linear recurrences with constant coefficients, signature (2, 0, -1, 1, -1).
FORMULA
From David Scambler, May 22 2012: (Start)
G.f.: (1+x^3-x^4)/(1-2*x+x^3-x^4+x^5).
a(n) = 2^n for n<4; otherwise, a(n) = a(n-1)+a(n-2)+a(n-4)+1. (End)
MATHEMATICA
CoefficientList[Series[ (1+x^3-x^4)/(1-2*x+x^3-x^4+x^5) , {x, 0, 45}], x] (* David Scambler, May 22 2012 *)
PROG
(PARI) x='x+O('x^50); Vec( (1+x^3-x^4)/(1-2*x+x^3-x^4+x^5) ) \\ G. C. Greubel, sep 18 2017
CROSSREFS
KEYWORD
nonn,easy,walk
AUTHOR
R. H. Hardin, Aug 14 2009
EXTENSIONS
Edited by Alois P. Heinz, Oct 27 2017
STATUS
approved