OFFSET
1,3
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 (4,-6,4,-1).
FORMULA
a(n) = (n-2)*(9*n^2 - 45*n + 70)/2, n>=2.
G.f.: x^3*(8+2*x+17*x^2)/(1-x)^4. - Vaclav Kotesovec, Mar 24 2010
E.g.f.: 70 + 17*x + (1/2)*(-140 + 106*x - 36*x^2 + 9*x^3)*exp(x). - G. C. Greubel, Apr 29 2022
MATHEMATICA
CoefficientList[Series[x^2*(8+2*x+17*x^2)/(1-x)^4, {x, 0, 50}], x] (* Vincenzo Librandi, May 27 2013 *)
LinearRecurrence[{4, -6, 4, -1}, {0, 0, 8, 34, 105}, 40] (* Harvey P. Dale, Oct 07 2023 *)
PROG
(Magma) [0] cat [(n-2)*(9*n^2-45*n+70)/2: n in [2..50]]; // G. C. Greubel, Apr 29 2022
(SageMath) [(1/8)*(n-2)*(9*(2*n-5)^2+55) +17*bool(n==1) for n in (1..50)] # G. C. Greubel, Apr 29 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vaclav Kotesovec, Jan 29 2010
EXTENSIONS
More terms from Vincenzo Librandi, May 27 2013
STATUS
approved