OFFSET
1,2
REFERENCES
E. Bonsdorff, K. Fabel, O. Riihimaa, Schach und Zahl, 1966, p. 51-63
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Vaclav Kotesovec, Number of ways of placing non-attacking queens and kings on boards of various sizes
Index entries for linear recurrences with constant coefficients, signature (7,-21,35,-35,21,-7,1).
FORMULA
Explicit formula (Karl Fabel, 1966): a(n) = (n - 2)*(n + 5)*(n^4 - 3*n^3 - 8*n^2 + 66*n - 108)/6, for n >= 4.
G.f.: 4*x^2*(3*x^8-20*x^7+43*x^6-38*x^5+23*x^4-11*x^3-27*x^2-2*x-1)/(x-1)^7. - Vaclav Kotesovec, Mar 25 2010
From G. C. Greubel, Apr 18 2022: (Start)
a(n) = 7*a(n-1) -21*a(n-2) +35*a(n-3) -35*a(n-4) +21*a(n-5) -7*a(n-6) +a(n-7), for n >= 11.
E.g.f.: (1/6)*(-1080 - 312*x + 12*x^2 +13*x^3 + (1080 - 768*x + 228*x^2 + 38*x^4 + 15*x^5 + x^6)*exp(x)). (End)
MATHEMATICA
CoefficientList[Series[4x(3x^8 -20x^7 +43x^6 -38x^5 +23x^4 -11x^3 -27x^2 -2x -1)/ (x-1)^7, {x, 0, 40}], x] (* Vincenzo Librandi, May 02 2013 *)
PROG
(Magma) [n le 3 select (n*(n-1))^2 else (n-2)*(n+5)*(n^4 -3*n^3 -8*n^2 +66*n -108)/6: n in [1..50]]; // G. C. Greubel, Apr 18 2022
(SageMath)
def A172134(n):
if (n<4): return (n*(n-1))^2
else: return (n-2)*(n+5)*(n^4 -3*n^3 -8*n^2 +66*n -108)/6
[A172134(n) for n in (1..50)] # G. C. Greubel, Apr 18 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vaclav Kotesovec, Jan 26 2010
STATUS
approved