OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,1,2,1,0,-1).
FORMULA
a(n) = a(n-2) + 2*a(n-3) + a(n-4) - a(n-6).
G.f.: (x+1)*(x^2+x+1)*(x^3-x^2-x-1)/(-x^6+x^4+2*x^3+x^2-1). - Alois P. Heinz, Jun 05 2024
EXAMPLE
For n=3 the a(3)=9 solutions are 010, 012, 020, 021, 101, 102, 120, 201, 210.
MATHEMATICA
LinearRecurrence[{0, 1, 2, 1, 0, -1}, {1, 3, 6, 9, 14, 23, 36}, 40] (* Harvey P. Dale, Aug 04 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Miquel A. Fiol, Jun 05 2024
STATUS
approved
