OFFSET
1,1
COMMENTS
Column 2 of A183719. [Corrected by M. F. Hasler, Oct 07 2014]
This sequence counts closed walks of length (n+2) at the vertex of a triangle, to which a loop has been added to one of the remaining vertices and two loops has been added to the third vertex. - David Neil McGrath, Sep 04 2014
LINKS
R. H. Hardin, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (3,1,-1).
FORMULA
a(n) = 3*a(n-1) + a(n-2) - a(n-3).
The top left element of A^(n+2) where A=(0,1,1;1,1,1;1,1,2). - David Neil McGrath, Sep 04 2014
a(n) ~ c*k^n where k = 1.629316... is the largest root of x^3 - 3x^2 - x + 1 and c = 1.6293... is conjecturally the largest root of 148x^3 - 296x^2 + 90x - 1. - Charles R Greathouse IV, Sep 15 2014
G.f.: x*(5+2*x-2*x^2) / (1-3*x-x^2+x^3). - Colin Barker, Mar 16 2016
EXAMPLE
Some solutions for 5 X 3:
..0..1..4....1..2..0....4..0..4....4..3..4....4..0..4....1..4..0....3..4..2
..3..2..3....0..3..4....2..1..3....0..2..0....3..2..3....2..3..1....1..0..1
..4..1..0....1..2..1....4..0..4....4..3..4....0..1..0....0..4..0....2..4..3
..3..2..3....0..3..4....3..2..3....0..2..1....4..2..3....1..3..1....1..0..1
..4..0..4....1..2..1....4..1..0....4..3..0....0..1..0....0..4..0....2..3..2
...
...R..L.......R..L.......R..L.......L..R.......R..L.......L..R.......R..L...
...L..R.......L..R.......L..R.......R..L.......L..R.......R..L.......L..R...
...R..L.......R..L.......R..L.......L..R.......R..L.......L..R.......R..L...
...L..R.......L..R.......L..R.......R..L.......L..R.......R..L.......L..R...
PROG
(PARI) a(n)=([0, 1, 1; 1, 1, 1; 1, 1, 2]^(n+2))[1, 1] \\ Charles R Greathouse IV, Sep 15 2014
(PARI) Vec(x*(5+2*x-2*x^2)/(1-3*x-x^2+x^3) + O(x^50)) \\ Colin Barker, Mar 16 2016
CROSSREFS
KEYWORD
nonn,walk,easy
AUTHOR
R. H. Hardin, Jan 06 2011
STATUS
approved