cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A035291 Number of ways to place a non-attacking white and black queen on n X n chessboard.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			There are 16 ways of putting distinct queens on 3 X 3 so that neither can capture the other.
		

Programs

  • 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
  • Mathematica
    CoefficientList[Series[8*x^3*(2+x)/(1-x)^5,{x,0,40}],x] (* Vincenzo Librandi, Apr 22 2012 *)

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]