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.

A061995 Number of ways to place 2 nonattacking kings on an n X n board.

Original entry on oeis.org

0, 0, 0, 16, 78, 228, 520, 1020, 1806, 2968, 4608, 6840, 9790, 13596, 18408, 24388, 31710, 40560, 51136, 63648, 78318, 95380, 115080, 137676, 163438, 192648, 225600, 262600, 303966, 350028, 401128, 457620, 519870, 588256
Offset: 0

Views

Author

Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), May 31 2001

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [(n-1)*(n-2)*(n^2+3*n-2)/2: n in [1..30]]; // G. C. Greubel, Nov 04 2018
  • Mathematica
    CoefficientList[Series[2 x^3 (-8 + x + x^2) / (x-1)^5, {x, 0, 40}], x] (* Vincenzo Librandi, May 02 2013 *)
  • PARI
    x='x+O('x^30); Vec(2*x^3*(x^2+x-8)/(x-1)^5) \\ G. C. Greubel, Nov 04 2018
    

Formula

G.f.: 2*x^3*(x^2 + x - 8)/(x - 1)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), n >= 6.
a(n) = (n - 1)*(n - 2)*(n^2 + 3*n - 2)/2, n >= 1.
E.g.f.: (4 - (4 - 4*x + 2*x^2 - 6*x^3 - x^4)*exp(x))/2. - G. C. Greubel, Nov 04 2018