OFFSET
0,3
COMMENTS
Extended to a(0)-a(2) using the formula/recurrence.
LINKS
Eric Weisstein's World of Mathematics, Torus Grid Graph
Eric Weisstein's World of Mathematics, Total Domination Number
Index entries for linear recurrences with constant coefficients, signature (1,1,-1,1,-1,-1,1).
FORMULA
a(n) = (3 -(-1)^n*(n - 1) + n + 2*n^2 - 4*cos(n*Pi/2) + 2*sin(n*Pi/2))/8.
a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7).
G.f.: -x*(1 + x + 2*x^4)/((-1 + x)^3*(1 + x)^2*(1 + x^2)).
a(n) ~ n^2/4. - Andrew Howroyd, Apr 21 2018
MATHEMATICA
Table[(3-(-1)^n*(n-1)+n+2*n^2-4*Cos[n*Pi/2]+2*Sin[n*Pi/2])/8, {n, 0, 20}]
LinearRecurrence[{1, 1, -1, 1, -1, -1, 1}, {1, 2, 3, 4, 8, 10, 14}, {0, 20}]
CoefficientList[Series[-x (1 + x + 2 x^4)/((-1 + x)^3 (1 + x)^2 (1 + x^2)), {x, 0, 20}], x]
PROG
(PARI) for(n=0, 30, print1(round((3-(-1)^n*(n-1) +n +2*n^2 -4*cos(n*Pi/2) + 2*sin(n*Pi/2))/8), ", ")) \\ G. C. Greubel, Apr 09 2018
(Magma) R:=RealField(); [Round((3 -(-1)^n*(n-1) +n +2*n^2 - 4*Cos(n*Pi(R)/2) + 2*Sin(n*Pi(R)/2))/8): n in [0..20]]; // G. C. Greubel, Apr 09 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Apr 07 2018
STATUS
approved