OFFSET
3,1
LINKS
Eric Weisstein's World of Mathematics, Cycle Graph
Eric Weisstein's World of Mathematics, Minimum Dominating Set
Index entries for linear recurrences with constant coefficients, signature (0, 0, 3, 0, 0, -3, 0, 0, 1).
FORMULA
a(n) = 3 if n == 0 (mod 3),
n*(n+5)/6 if n == 1 (mod 3),
n if n == 2 (mod 3).
a(n) = 3*a(n-3) - 3*a(n-6) + a(n-9).
G.f.: -(x*(3 + 6*x + 5*x^2 - 6*x^3 - 4*x^4 - 7*x^5 + 3*x^6 + x^7 + 2*x^8))/((-1 + x)^3*(1 + x + x^2)^3).
MATHEMATICA
Table[Piecewise[{{3, Mod[n, 3] == 0}, {n (n + 5)/6, Mod[n, 3] == 1}, {n, Mod[n, 3] == 2}}], {n, 3, 20}]
CoefficientList[Series[-(3 + 6 x + 5 x^2 - 6 x^3 - 4 x^4 - 7 x^5 + 3 x^6 + x^7 + 2 x^8)/((-1 + x)^3 (1 + x + x^2)^3), {x, 0, 20}], x]
LinearRecurrence[{0, 0, 3, 0, 0, -3, 0, 0, 1}, {3, 6, 5, 3, 14, 8, 3, 25, 11}, 20]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Sep 05 2021
STATUS
approved