OFFSET
1,2
LINKS
Nathan Sun, On d-permutations and Pattern Avoidance Classes, arXiv:2208.08506 [math.CO], 2022.
Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-2).
FORMULA
a(n) = A308580(n-1) - 2.
a(n) = a(n-1) + 3*2^(n-2) + 2*(n-2).
From Stefano Spezia, Aug 27 2022: (Start)
G.f.: x*(1 - x + x^2 - 3*x^3)/((1 - x)^3*(1 - 2*x)).
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4) for n > 4.
a(n) = 3*2^(n-1) + n^2 - 3*n. (End)
MATHEMATICA
LinearRecurrence[{5, -9, 7, -2}, {1, 4, 12, 28}, {1, 35}] (* Hugo Pfoertner, Aug 27 2022 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Nathan Sun, Aug 24 2022
STATUS
approved