%I #47 Jun 28 2017 01:01:31
%S 0,1,4,5,8,13,18,25,32,41,50,61,72,85,98,113,128,145,162,181,200,221,
%T 242,265,288,313,338,365,392,421,450,481,512,545,578,613,648,685,722,
%U 761,800,841,882,925,968,1013,1058,1105,1152,1201,1250,1301,1352,1405
%N Maximal number of non-attacking knights on an n X n board.
%C In other words, independence number of the n X n knight graph. - _Eric W. Weisstein_, May 05 2017
%D H. E. Dudeney, The Knight-Guards, #319 in Amusements in Mathematics; New York: Dover, p. 95, 1970.
%D J. S. Madachy, Madachy's Mathematical Recreations, New York, Dover, pp. 38-39 1979.
%H Vincenzo Librandi, <a href="/A030978/b030978.txt">Table of n, a(n) for n = 0..1000</a>
%H V. Kotesovec, <a href="https://oeis.org/wiki/User:Vaclav_Kotesovec">Non-attacking chess pieces</a>, 6ed, 2013, p. 751.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/IndependenceNumber.html">Independence Number</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/KnightGraph.html">Knight Graph</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/KnightsProblem.html">Knights Problem</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1).
%F a(n) = 4 if n = 2, n^2/2 if n even > 2, (n^2+1)/2 if n odd > 1.
%F a(n) = 4 if n = 2, (1 + (-1)^(1 + n) + 2 n^2)/4 otherwise.
%F G.f.: x*(2*x^5-4*x^4+3*x^2-2*x-1) / ((x-1)^3*(x+1)). [_Colin Barker_, Jan 09 2013]
%t CoefficientList[Series[x (2 x^5 - 4 x^4 + 3 x^2 - 2 x - 1)/((x - 1)^3 (x + 1)), {x, 0, 60}], x] (* _Vincenzo Librandi_, Oct 19 2013 *)
%t Join[{0, 1, 4}, Table[If[EvenQ[n], n^2/2, (n^2 + 1)/2], {n, 3, 60}]] (* _Harvey P. Dale_, Nov 28 2014 *)
%t Join[{0, 1, 4}, LinearRecurrence[{2, 0, -2, 1}, {5, 8, 13, 18}, 60]] (* _Harvey P. Dale_, Nov 28 2014 *)
%t Table[If[n == 2, 4, (1 - (-1)^n + 2 n^2)/4], {n, 20}] (* _Eric W. Weisstein_, May 05 2017 *)
%t Table[Length[FindIndependentVertexSet[KnightTourGraph[n, n]][[1]]], {n, 20}] (* _Eric W. Weisstein_, Jun 27 2017 *)
%Y Agrees with A000982 for n>1.
%Y Cf. A244081.
%K nonn,easy
%O 0,3
%A _Eric W. Weisstein_
%E More terms from _Erich Friedman_
%E Definition clarified by _Vaclav Kotesovec_, Sep 16 2014