OFFSET
0,2
COMMENTS
Minimum number of knights required to dominate a 2 X n board.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Wikipedia, Knight (chess)
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-2,2,-1).
FORMULA
a(n) = 2*(floor((n+4)/6) + floor((n+5)/6)).
From Colin Barker, May 26 2017: (Start)
G.f.: 2*x / ((1 - x)^2*(1 - x + x^2)*(1 + x + x^2)).
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - a(n-6) for n>5.
(End)
a(n) = 2*A099480(n-1).
EXAMPLE
For n=3 we need a(3)=4 knights to dominate a 2 X 3 board.
MATHEMATICA
Table[2*(Floor[(i+4)/6]+Floor[(i+5)/6]), {i, 0, 67}]
LinearRecurrence[{2, -2, 2, -2, 2, -1}, {0, 2, 4, 4, 4, 4}, 70] (* Harvey P. Dale, Jul 07 2020 *)
PROG
(Python) [2*((i+4)//6+(i+5)//6) for i in range(68)]
(PARI) concat(0, Vec(2*x / ((1 - x)^2*(1 - x + x^2)*(1 + x + x^2)) + O(x^100))) \\ Colin Barker, May 27 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Nacin, May 24 2017
STATUS
approved