OFFSET
1,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = n^4 - 4 n^3 + n^2 + 10 n - 6.
G.f.: -2*x^3*(x+1)*(x^3-5*x^2+7*x+3)/(x-1)^5. [Colin Barker, Jan 09 2013]
EXAMPLE
There are 6 ways of putting 1 white and 1 black pawn on 3 X 3 so that neither can capture the other. pawns can't be on first or last rank.
MATHEMATICA
CoefficientList[Series[- 2 x^2 (x + 1) (x^3 - 5 x^2 + 7 x + 3)/(x - 1)^5, {x, 0, 50}], x] (* Vincenzo Librandi, Oct 20 2013 *)
PROG
(Magma) [n le 2 select 0 else n^4-4*n^3+n^2+10*n-6: n in [1..50]]; // Vincenzo Librandi, Oct 20 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved