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.

A172226 Number of ways to place 3 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 0, 22, 276, 1474, 5248, 14690, 35012, 74326, 144544, 262398, 450580, 739002, 1166176, 1780714, 2642948, 3826670, 5420992, 7532326, 10286484, 13830898, 18336960, 24002482, 31054276, 39750854, 50385248, 63287950
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

A wazir is a (fairy chess) leaper [0,1].

Crossrefs

Programs

  • Magma
    I:=[0, 0, 22, 276, 1474, 5248, 14690, 35012]; [n le 8 select I[n] else 7*Self(n-1)-21*Self(n-2)+35*Self(n-3)-35*Self(n-4)+21*Self(n-5)-7*Self(n-6)+Self(n-7): n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
    
  • Magma
    [0] cat [(n-2)*(n^5+2*n^4-11*n^3-10*n^2+42*n-12)/6: n in [2..30]]; // Vincenzo Librandi, Apr 30 2013
  • Maple
    A172226:=n->`if`(n=1, 0, (n-2)*(n^5 + 2*n^4 - 11*n^3 - 10*n^2 + 42*n - 12)/6); seq(A172226(n), n=1..60); # Wesley Ivan Hurt, Feb 06 2014
  • Mathematica
    CoefficientList[Series[2 x^2 (x^5 - 9 x^4 + 22 x^3 - 2  x^2 - 61 x - 11) / (x-1)^7, {x, 0, 60}], x] (* Vincenzo Librandi, Apr 30 2013 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,0,22,276,1474,5248,14690,35012},30] (* Harvey P. Dale, Apr 08 2022 *)

Formula

a(n) = (n-2)*(n^5 + 2*n^4 - 11*n^3 - 10*n^2 + 42*n - 12)/6, n>=2.
G.f.: 2*x^3*(x^5-9*x^4+22*x^3-2*x^2-61*x-11)/(x-1)^7. - Vaclav Kotesovec, Mar 25 2010
a(n) = 7*a(n-1)-21*a(n-2)+35*a(n-3)-35*a(n-4)+21*a(n-5)-7*a(n-6)+a(n-7). - Vincenzo Librandi, Apr 30 2013
a(n) = A232833(n,3). - R. J. Mathar, Apr 11 2024