OFFSET
1,3
LINKS
Eric Weisstein's World of Mathematics, Path Graph
Eric Weisstein's World of Mathematics, Total Dominating Set
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1).
FORMULA
a(n) = ((-1)^n*(n - 2)^2 + (6 + n)^2 - 2*(n - 2)*(n + 6)*cos(n*Pi/2) - 48*sin(n*Pi/2))/6.
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12).
MATHEMATICA
Table[Piecewise[{{1, Mod[n, 4] == 0}, {((n + 2)/4)^2, Mod[n, 4] == 2}, {(n - 1)/4, Mod[n, 4] == 1}, {(n + 5)/4, Mod[n, 4] == 3}}], {n, 20}]
Table[((-1)^n (n - 2)^2 + (6 + n)^2 - 2 (n - 2) (n + 6) Cos[n Pi/2] - 48 Sin[n Pi/2])/64, {n, 20}]
LinearRecurrence[{0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1}, {0, 1, 2, 1, 1, 4, 3, 1, 2, 9, 4, 1}, 20]
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Apr 11 2018
STATUS
approved