login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A035291
Number of ways to place a non-attacking white and black queen on n X n chessboard.
2
0, 0, 16, 88, 280, 680, 1400, 2576, 4368, 6960, 10560, 15400, 21736, 29848, 40040, 52640, 68000, 86496, 108528, 134520, 164920, 200200, 240856, 287408, 340400, 400400, 468000, 543816, 628488, 722680, 827080, 942400, 1069376, 1208768
OFFSET
1,3
FORMULA
a(n) = (3 n^4 - 10 n^3 + 9 n^2 - 2 n)/3.
Equals 4 * A052149(n-1). [N. J. A. Sloane, Feb 20 2005]
G.f.: 8*x^3*(2+x)/(1-x)^5. [Colin Barker, Apr 17 2012]
EXAMPLE
There are 16 ways of putting distinct queens on 3 X 3 so that neither can capture the other.
MATHEMATICA
CoefficientList[Series[8*x^3*(2+x)/(1-x)^5, {x, 0, 40}], x] (* Vincenzo Librandi, Apr 22 2012 *)
PROG
(Magma) [(3*n^4-10*n^3+9*n^2-2*n)/3: n in [1..40]]; // Vincenzo Librandi, Apr 22 2012
(Magma) I:=[0, 0, 16, 88, 280]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..40]]; // Vincenzo Librandi, Apr 22 2012
CROSSREFS
Sequence in context: A070052 A203249 A022676 * A358084 A309271 A120045
KEYWORD
nonn,easy
STATUS
approved