login
A061995
Number of ways to place 2 nonattacking kings on an n X n board.
20
0, 0, 0, 16, 78, 228, 520, 1020, 1806, 2968, 4608, 6840, 9790, 13596, 18408, 24388, 31710, 40560, 51136, 63648, 78318, 95380, 115080, 137676, 163438, 192648, 225600, 262600, 303966, 350028, 401128, 457620, 519870, 588256
OFFSET
0,4
LINKS
Vaclav Kotesovec, Number of ways of placing non-attacking queens and kings on boards of various sizes, part of V. Kotesovec, Between chessboard and computer, 1996, pp. 204 - 206.
FORMULA
G.f.: 2*x^3*(x^2 + x - 8)/(x - 1)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), n >= 6.
a(n) = (n - 1)*(n - 2)*(n^2 + 3*n - 2)/2, n >= 1.
E.g.f.: (4 - (4 - 4*x + 2*x^2 - 6*x^3 - x^4)*exp(x))/2. - G. C. Greubel, Nov 04 2018
MATHEMATICA
CoefficientList[Series[2 x^3 (-8 + x + x^2) / (x-1)^5, {x, 0, 40}], x] (* Vincenzo Librandi, May 02 2013 *)
PROG
(PARI) x='x+O('x^30); Vec(2*x^3*(x^2+x-8)/(x-1)^5) \\ G. C. Greubel, Nov 04 2018
(Magma) [0] cat [(n-1)*(n-2)*(n^2+3*n-2)/2: n in [1..30]]; // G. C. Greubel, Nov 04 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), May 31 2001
STATUS
approved