OFFSET
1,2
REFERENCES
Posting by Thomas Womack (mert0236(AT)sable.ox.ac.uk) to sci.math newsgroup, Apr 21 1999.
LINKS
Robert Israel, Table of n, a(n) for n = 1..2985
Jay Pantone, Alexander R. Klotz, and Everett Sullivan, Exactly-solvable self-trapping lattice walks. II. Lattices of arbitrary height., arXiv:2407.18205 [math.CO], 2024.
Index entries for linear recurrences with constant coefficients, signature (2,2,-4).
FORMULA
a(1) = 1; a(2m) = Sum_{i = 2...2m-1} a(i) + 3*2^(m-1); a(2m+1) = Sum_{i = 2...2m} a(i) + 5*2^(m-1).
a(n) = 11*2^(n-3) - (4 + (-1)^n)*(2^((1/4)*(2n - 7 - (-1)^n))), n >= 2. - Nathaniel Johnston, Feb 03 2006
a(n) = 2*a(n-1)+2*a(n-2)-4*a(n-3) for n>4. G.f.: x*(1+x-x^3)/(1-2*x-2*x^2+4*x^3). - Colin Barker, Jul 19 2012
EXAMPLE
On a 3 X 3 board labeled 123 456 789 (reading across rows), 125478963 is such a tour.
MAPLE
A046994:=n->`if`(n=1, 1, 11*2^(n-3)-(4+(-1)^n)*(2^((1/4)*(2*n-7-(-1)^n)))): seq(A046994(n), n=1..30); # Wesley Ivan Hurt, Sep 14 2014
MATHEMATICA
CoefficientList[Series[(1 + x - x^3)/(1 - 2 x - 2 x^2 + 4 x^3), {x, 0, 30}], x] (* Wesley Ivan Hurt, Sep 14 2014 *)
PROG
(PARI) a(n)=if(n>1, ([0, 1, 0; 0, 0, 1; -4, 2, 2]^(n-2)*[3; 8; 17])[1, 1], 1) \\ Charles R Greathouse IV, May 13 2026
CROSSREFS
KEYWORD
nonn,walk,easy
AUTHOR
Antreas P. Hatzipolakis (xpolakis(AT)otenet.gr)
EXTENSIONS
More terms and formula from Hugo van der Sanden
STATUS
approved
