OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Ladder Graph
Index entries for linear recurrences with constant coefficients, signature (3,-2,-1,1)
FORMULA
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4) for n > 4.
G.f.: x*(1 + 5*x + 3*x^2)/((1 - x)^2*(1 - x - x^2)).
MATHEMATICA
LinearRecurrence[{3, -2, -1, 1}, {1, 8, 25, 58}, 40] (* Harvey P. Dale, Dec 28 2023 *)
PROG
(PARI) Vec((1 + 5*x + 3*x^2)/((1 - x)^2*(1 - x - x^2)) + O(x^40))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Andrew Howroyd, Jan 29 2023
STATUS
approved