OFFSET
0,3
COMMENTS
Extended to a(0) and a(1) using the formula/recurrence. The total domination number of the 1 X 1 grid graph is undefined.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
Eric Weisstein's World of Mathematics, Grid Graph.
Eric Weisstein's World of Mathematics, Total Domination Number.
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,1,-2,1).
FORMULA
a(n) = ((-1)^n + 2*n*(n + 2) + 4*sin(n*Pi/2) - 1)/8.
a(n) = 2*a(n-1) - a(n-2) + a(n-4) - 2*a(n-5) + a(n-6).
G.f.: x*(1 + 2*x^3 - x^4)/((1 - x)^3*(1 + x + x^2 + x^3)).
a(4*m + r) = (2*m + 1)*(2*m + r) for 0 <= r < 4. - Charles Kusniec, Aug 16 2025
From Amiram Eldar, Aug 26 2025: (Start)
Sum_{n>=1} 1/a(n) = Pi^2/8 + 3/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/8 - 1/2. (End)
MATHEMATICA
Table[(-1 + (-1)^n + 2 n (2 + n) + 4 Sin[n Pi/2])/8, {n, 0, 20}]
LinearRecurrence[{2, -1, 0, 1, -2, 1}, {0, 1, 2, 3, 6, 9}, 20]
CoefficientList[Series[x (-1 - 2 x^3 + x^4)/((-1 + x)^3 (1 + x + x^2 + x^3)), {x, 0, 20}], x]
PROG
(PARI) for(n=0, 30, print1(round(((-1)^n + 2*n*(n + 2) + 4*sin(n*Pi/2) - 1)/8), ", ")) \\ G. C. Greubel, Apr 09 2018
(PARI) a(n)=my(m=n\4); (2*m+1)*(2*m + n%4) \\ Andrew Howroyd, Aug 17 2025
(Magma) R:=RealField(); [Round(((-1)^n + 2*n*(n + 2) + 4*Sin(n*Pi(R)/2) - 1)/8): n in [0..30]]; // G. C. Greubel, Apr 09 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Apr 08 2018
EXTENSIONS
a(0)=0 prepended and offset corrected by Andrew Howroyd, Aug 17 2025
STATUS
approved
