OFFSET
1,2
COMMENTS
Sequence extended to a(1) using the formula/recurrence.
LINKS
Eric Weisstein's World of Mathematics, Pan 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) = (n+3)/2 for n = 3 (mod 4)
= 2 for n = 0 (mod 4)
= (n+1)/2 for n = 1 (mod 3)
= (n+2)^2/8 for n = 2 (mod 4).
a(n) = 3*a(n-4)-3*a(n-8)+a(n-12) for n > 12.
G.f.: x*(-1-2*x-3*x^2-2*x^3-2*x^5+4*x^6+4*x^7+x^8-x^10-2*x^11)/(-1+x^4)^3.
MATHEMATICA
Table[Piecewise[{{(n + 3)/2, Mod[n, 4] == 3}, {2, Mod[n, 4] == 0}, {(n + 1)/2, Mod[n, 4] == 1}, {(n + 2)^2/8, Mod[n, 4] == 2}}], {n, 20}]
LinearRecurrence[{0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1}, {1, 2, 3, 2, 3, 8, 5, 2, 5, 18, 7, 2}, 20]
CoefficientList[Series[(-1 - 2 x - 3 x^2 - 2 x^3 - 2 x^5 + 4 x^6 + 4 x^7 + x^8 - x^10 - 2 x^11)/(-1 + x^4)^3, {x, 0, 20}], x]
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Sep 09 2021
STATUS
approved