OFFSET
0,2
COMMENTS
Extended to a(0)-a(2) using the formula/recurrence.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..10000
Eric Weisstein's World of Mathematics, Moebius Ladder
Eric Weisstein's World of Mathematics, Total Domination Number
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1).
FORMULA
a(n) = (3 - (-1)^n + 4*n + cos(n*Pi/3) - 3*cos(2*n*Pi/3) + sqrt(3)*sin(n*Pi/3) + sin(2*n*Pi/3)/sqrt(3))/6.
a(n) = a(n-1) + a(n-6) - a(n-7).
G.f.: x*(2 + x^3 + x^4)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5)).
a(n) = a(n-6) + 4. - Andrew Howroyd, Apr 18 2018
a(n) = a(n-6*k) + 4*k. - Eric W. Weisstein, Apr 23 2018
MATHEMATICA
Table[(3 - (-1)^n + 4 n + Cos[n Pi/3] - 3 Cos[2 n Pi/3] + Sqrt[3] Sin[n Pi/3] + Sin[2 n Pi/3]/Sqrt[3])/6, {n, 0, 20}]
LinearRecurrence[{1, 0, 0, 0, 0, 1, -1}, {2, 2, 2, 3, 4, 4, 6}, {0, 50}]
CoefficientList[Series[x (2 + x^3 + x^4)/((-1 + x)^2 (1 + x + x^2 + x^3 + x^4 + x^5)), {x, 0, 20}], x]
PROG
(PARI) x='x+O('x^50); concat(0, Vec(x*(2+x^3+x^4)/((1-x)^2*(1+x+x^2+x^3+x^4+x^5)))) \\ G. C. Greubel, Apr 09 2018
(Magma) I:=[2, 2, 2, 3, 4, 4, 6]; [0] cat [n le 7 select I[n] else Self(n-1) + Self(n-6) - Self(n-7): n in [1..50]]; // G. C. Greubel, Apr 09 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Apr 07 2018
STATUS
approved