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.

Showing 1-10 of 10 results.

A172227 Number of ways to place 4 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 0, 6, 405, 5024, 31320, 133544, 446421, 1258590, 3126724, 7042930, 14669709, 28658436, 53069000, 93909924, 159819965, 262913874, 419816676, 652912510, 991835749, 1475233800, 2152832664, 3087838016, 4359706245, 6067321574, 8332617060, 11304678954
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- x^2 (4 x^8 - 26 x^7 + 3 x^6 + 303 x^5 - 736 x^4 + 180 x^3 + 1595 x^2 + 351 x + 6) / (x - 1)^9, {x, 0, 50}], x] (* Vincenzo Librandi, May 28 2013 *)

Formula

a(n) = (n^8-30n^6+24n^5+323n^4-504n^3-1110n^2+2760n-1224)/24, n>=3.
G.f.: -x^3*(4*x^8-26*x^7+3*x^6+303*x^5-736*x^4+180*x^3+1595*x^2+351*x+6)/(x-1)^9. - Vaclav Kotesovec, Apr 29 2011
a(n) = A232833(n,4). - R. J. Mathar, Apr 11 2024

Extensions

Corrected a(3) and g.f., Vaclav Kotesovec, Apr 29 2011

A172136 Number of ways to place 5 nonattacking knights on an n X n board.

Original entry on oeis.org

0, 0, 2, 340, 9386, 97580, 649476, 3184708, 12472084, 41199404, 119171110, 309957412, 739123094, 1639655452, 3422020324, 6778432292, 12833460256, 23356032940, 41051290730, 69954580804
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 26 2010

Keywords

Comments

For any fixed value of k>1, a(n) = n^(2*k) /k! - 9*n^(2*k - 2) /2/(k - 2)! + 12*n^(2*k - 3) /(k - 2)! + ...

Crossrefs

Column k=5 of A244081.

Programs

  • Mathematica
    CoefficientList[Series[2x^2(74 x^15 -518x^14 +1110x^13 +1046x^12 -11332x^11 + 29950x^10 -42430x^9 +32476x^8 -11684x^7 -1000x^6 +15021x^5 -18443x^4 -6352x^3 - 2878x^2 -159x -1)/(x-1)^11, {x,0,40}], x] (* Vincenzo Librandi, May 02 2013 *)
  • SageMath
    [0,0,2,340,9386,97580,649476] + [(n^10 -90*n^8 +240*n^7 +3235*n^6 - 16320*n^5 -40530*n^4 +396480*n^3 -231656*n^2 -3359520*n +6509280)/120 for n in (8..50)] # G. C. Greubel, Apr 19 2022

Formula

Explicit formula: a(n) = (n^10 - 90*n^8 + 240*n^7 + 3235*n^6 - 16320*n^5 - 40530*n^4 + 396480*n^3 - 231656*n^2 - 3359520*n + 6509280)/120, n >= 8.
G.f.: 2*x^3 * (74*x^15 -518*x^14 +1110*x^13 +1046*x^12 -11332*x^11 +29950*x^10 -42430*x^9 +32476*x^8 -11684*x^7 -1000*x^6 +15021*x^5 -18443*x^4 -6352*x^3 -2878*x^2 -159*x -1) / (x-1)^11. [Vaclav Kotesovec, Mar 25 2010]

A244081 Number T(n,k) of ways to place k nonattacking knights on an n X n board; triangle T(n,k), n>=0, 0<=k<=A030978(n), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 4, 6, 4, 1, 1, 9, 28, 36, 18, 2, 1, 16, 96, 276, 412, 340, 170, 48, 6, 1, 25, 252, 1360, 4436, 9386, 13384, 12996, 8526, 3679, 994, 158, 15, 1, 1, 36, 550, 4752, 26133, 97580, 257318, 491140, 688946, 716804, 556274, 323476, 141969, 47684, 12488, 2560, 393, 40, 2
Offset: 0

Views

Author

Alois P. Heinz, Jun 19 2014

Keywords

Comments

In other words, the n-th row gives the coefficients of the independence polynomial of the n X n knight graph. - Eric W. Weisstein, May 05 2017

Examples

			T(4,8) = 6:
  ._______. ._______. ._______. ._______. ._______. ._______.
  |_|o|_|o| |o|_|o|_| |o|o|o|o| |o|_|_|o| |o|_|o|o| |o|o|_|o|
  |o|_|o|_| |_|o|_|o| |_|_|_|_| |o|_|_|o| |_|_|_|o| |o|_|_|_|
  |_|o|_|o| |o|_|o|_| |_|_|_|_| |o|_|_|o| |o|_|_|_| |_|_|_|o|
  |o|_|o|_| |_|o|_|o| |o|o|o|o| |o|_|_|o| |o|o|_|o| |o|_|o|o| .
.
Triangle T(n,k) begins:
  1;
  1,  1;
  1,  4,   6,    4,    1;
  1,  9,  28,   36,   18,    2;
  1, 16,  96,  276,  412,  340,   170,    48,    6;
  1, 25, 252, 1360, 4436, 9386, 13384, 12996, 8526, 3679, 994, 158, 15, 1;
  ...
As independence polynomials:
  1
  1 + x
  1 + 4*x + 6*x^2 + 4*x^3 + x^4
  1 + 9*x + 28*x^2 + 36*x^3 + 18*x^4 + 2*x^5
  1 + 16*x + 96*x^2 + 276*x^3 + 412*x^4 + 340*x^5 + 170*x^6 + 48*x^7 + 6*x^8
  ...
		

Crossrefs

Columns k=0-6 give: A000012, A000290, A172132, A172134, A172135, A172136, A178499.
T(n,n) gives A201540.
Row sums give A141243.
Cf. A030978.

Programs

  • Maple
    b:= proc(n, l) option remember; local d, f, g, k;
          d:= nops(l)/3; f:=false;
          if n=0 then 1
        elif l[1..d]=[f$d] then b(n-1, [l[d+1..3*d][], true$d])
        else for k while not l[k] do od; g:= subsop(k=f, l);
             if k>1 then g:=subsop(2*d-1+k=f, g) fi;
             if k2 then g:=subsop(  d-2+k=f, g) fi;
             if k(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n, [true$(n*3)])):
    seq(T(n), n=0..7);
  • Mathematica
    b[n_, l_] := b[n, l] = Module[{d, f, g, k}, d = Length[l]/3; f = False; Which[n == 0, 1, l[[1 ;; d]] == Array[f&, d], b[n - 1, Join[l[[d + 1 ;; 3*d]], Array[True&, d]]], True, For[k = 1, !l[[k]], k++]; g = ReplacePart[l, k -> f];
         If [k > 1, g = ReplacePart[g, 2*d - 1 + k -> f]];
         If [k < d, g = ReplacePart[g, 2*d + 1 + k -> f]];
         If [k > 2, g = ReplacePart[ g, d - 2 + k -> f]];
         If [k < d - 1, g = ReplacePart[g, d + 2 + k -> f]];
         Expand[b[n, ReplacePart[l, k -> f]] + b[n, g]*x]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][
      b[n, Array[True&, n*3]]];
    Table[T[n], {n, 0, 7}] // Flatten (* Jean-François Alcover, Mar 28 2016, after Alois P. Heinz *)
    Table[Count[IndependentVertexSetQ[KnightTourGraph[n, n], #] & /@ Subsets[Range[n^2], {k}], True], {n, 4}, {k, 0, If[n == 2, 4, (1 - (-1)^n + 2 n^2)/4]}] // Flatten (* Eric W. Weisstein, May 05 2017 *)

A201540 Number of ways to place n nonattacking knights on an n X n board.

Original entry on oeis.org

1, 6, 36, 412, 9386, 257318, 8891854, 379978716, 19206532478, 1120204619108, 74113608972922, 5483225594409823, 448414229054798028, 40154319792412218900, 3906519894750904583838
Offset: 1

Views

Author

Vaclav Kotesovec, Dec 02 2011

Keywords

Comments

a(n) = A244081(n,n). - Alois P. Heinz, Jun 19 2014

Crossrefs

Programs

  • Mathematica
    b[n_, l_] := b[n, l] = Module[{d, f, g, k}, d = Length[l]/3; f = False; Which[n == 0, 1, l[[1 ;; d]] == Array[f&, d], b[n - 1, Join[l[[d + 1 ;; 3*d]], Array[True&, d]]], True, For[k = 1, ! l[[k]], k++]; g = ReplacePart[l, k -> f];
         If[k > 1, g = ReplacePart[g, 2*d - 1 + k -> f]];
         If[k < d, g = ReplacePart[g, 2*d + 1 + k -> f]];
         If[k > 2, g = ReplacePart[g, d - 2 + k -> f]];
         If[k < d - 1, g = ReplacePart[g, d + 2 + k -> f]];
         Expand[b[n, ReplacePart[l, k -> f]] + b[n, g]*x]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ b[n, Array[True&, n*3]]];
    a[n_] := T[n][[n + 1]];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 10}] (* Jean-François Alcover, Mar 29 2016, after Alois P. Heinz's code for A244081 *)

Formula

a(n) ~ n^(2n)/n!*exp(-9/2). - Vaclav Kotesovec, Nov 29 2011

Extensions

a(11) from Alois P. Heinz, Jun 19 2014
a(12)-a(13) from Vaclav Kotesovec, Jun 21 2014
a(14) from Vaclav Kotesovec, Aug 26 2016
a(15) from Vaclav Kotesovec, May 26 2021

A172213 Number of ways to place 4 nonattacking knights on a 4 X n board.

Original entry on oeis.org

1, 16, 84, 412, 1416, 3640, 7928, 15384, 27352, 45432, 71480, 107608, 156184, 219832, 301432, 404120, 531288, 686584, 873912, 1097432, 1361560, 1670968, 2030584, 2445592, 2921432
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[-(16 x^9 - 20 x^8 - 40 x^7 + 172 x^6 - 81 x^5 + 41 x^4 + 142 x^3 + 14 x^2 + 11 x + 1) / (x - 1)^5, {x, 0, 50}], x] (* Vincenzo Librandi, May 27 2013 *)
    LinearRecurrence[{5,-10,10,-5,1},{1,16,84,412,1416,3640,7928,15384,27352,45432},30] (* Harvey P. Dale, Apr 16 2022 *)

Formula

Explicit formula (Vaclav Kotesovec, 26.1.2010): a(n) = 8*(4*n^4-36*n^3+170*n^2-450*n+537)/3, n>=6.
G.f.: -x*(16*x^9-20*x^8-40*x^7+172*x^6-81*x^5+41*x^4+142*x^3+14*x^2+11*x+1)/(x-1)^5. - Vaclav Kotesovec, Mar 25 2010
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Wesley Ivan Hurt, Jun 26 2025

A172139 Number of ways to place 4 nonattacking zebras on an n X n board.

Original entry on oeis.org

0, 1, 126, 1168, 7334, 35749, 137970, 438984, 1208246, 2969389, 6662480, 13873100, 27144408, 50389581, 89424014, 152638280, 251834530, 403250693, 628798516, 957543164, 1427453780, 2087456085, 2999819778, 4242915176
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 26 2010

Keywords

Comments

Zebra is a (fairy chess) leaper [2,3].

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x(1+117*x+70*x^2+1274*x^3+1333*x^4-2109*x^5-462*x^6 +8858*x^7-17006*x^8+15166*x^9-6838*x^10+1478*x^11-650*x^12+760*x^13-376*x^14 +64*x^15)/(1-x)^9, {x,0,40}], x] (* Vincenzo Librandi, May 27 2013 *)
  • SageMath
    [0,1,126,1168,7334,35749,137970,438984] + [(n^8 -54*n^6 +240*n^5 +827*n^4 -8592*n^3 +10362*n^2 +75600*n -204864)/24 for n in (9..50)] # G. C. Greubel, Apr 19 2022

Formula

a(n) = (n^8 - 54*n^6 + 240*n^5 + 827*n^4 - 8592*n^3 + 10362*n^2 + 75600*n - 204864)/24, n >= 9.
G.f.: x^2*(1 + 117*x + 70*x^2 + 1274*x^3 + 1333*x^4 - 2109*x^5 - 462*x^6 + 8858*x^7 - 17006*x^8 + 15166*x^9 - 6838*x^10 + 1478*x^11 - 650*x^12 + 760*x^13 - 376*x^14 + 64*x^15)/(1-x)^9. - Vaclav Kotesovec, Mar 25 2010

A172531 Number of ways to place 4 nonattacking knights on an n X n toroidal board.

Original entry on oeis.org

0, 0, 0, 228, 600, 12357, 68796, 275888, 872532, 2344025, 5580762, 12107196, 24392446, 46261537, 83426400, 144157632, 240119696, 387393921, 607715342, 929951100
Offset: 1

Views

Author

Vaclav Kotesovec, Feb 06 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^3 (192 x^13 - 1728 x^12 + 7452 x^11 - 21238 x^10 + 46658 x^9 - 84582 x^8 + 125397 x^7 - 144875 x^6 + 124920 x^5 - 79904 x^4 + 39969 x^3 - 15165 x^2 + 1452 x - 228) / (x - 1)^9, {x, 0, 50}], x] (* Vincenzo Librandi, May 29 2013 *)

Formula

a(n) = n^2*(n^6 - 54*n^4 + 1115*n^2 - 8934)/24, n>=9.
G.f.: x^4 * (192*x^13 -1728*x^12 +7452*x^11 -21238*x^10 +46658*x^9 -84582*x^8 +125397*x^7 -144875*x^6 +124920*x^5 -79904*x^4 +39969*x^3 -15165*x^2 +1452*x -228) / (x-1)^9. - Vaclav Kotesovec, Mar 25 2010

A243719 Number of inequivalent (mod D_8) ways to place 4 nonattacking knights on an n X n board.

Original entry on oeis.org

1, 6, 66, 609, 3375, 14181, 47485, 136085, 342739, 784059, 1653033, 3267471, 6107271, 10901405, 18683285, 30934341, 49659915, 77611995, 118386689, 176753639, 258774303, 372270981, 526962861, 735113445, 1011678595, 1375177451, 1847843545, 2456771055, 3234056439
Offset: 2

Views

Author

Heinrich Ludwig, Jun 19 2014

Keywords

Crossrefs

Programs

  • Magma
    [1,6,66,609] cat [(n^8 - 54*n^6 + 144*n^5 + 1048*n^4 - 5280*n^3 - 2432*n^2 + 52800*n - 78912 + (1 - (-1)^n)/2*(14*n^4 - 48*n^3 - 158*n^2 + 768*n - 723))/192: n in [6..30]]; // Vincenzo Librandi, Jun 21 2014
  • Mathematica
    Drop[CoefficientList[Series[411 + 171*x + 38*x^2 - 5*x^3 - 15*x^4 - 6*x^5 - (411 - 1473*x - 236*x^2 + 6588*x^3 - 5073*x^4 - 11179*x^5 + 13200*x^6 + 4572*x^7 - 19047*x^8 - 991*x^9 + 9564*x^10 - 1776*x^11 - 1955*x^12 + 675*x^13) / ((1-x)^9*(1+x)^5), {x, 0, 20}], x],2] (* Vaclav Kotesovec, Jun 19 2014 *)

Formula

a(n) = (n^8 - 54*n^6 + 144*n^5 + 1048*n^4 - 5280*n^3 - 2432*n^2 + 52800*n - 78912 + (1 - (-1)^n)/2*(14*n^4 - 48*n^3 - 158*n^2 + 768*n - 723))/192 for n >= 6.
G.f.: 411 + 171*x + 38*x^2 - 5*x^3 - 15*x^4 - 6*x^5 - (411 - 1473*x - 236*x^2 + 6588*x^3 - 5073*x^4 - 11179*x^5 + 13200*x^6 + 4572*x^7 - 19047*x^8 - 991*x^9 + 9564*x^10 - 1776*x^11 - 1955*x^12 + 675*x^13) / ((1-x)^9*(1+x)^5). - Vaclav Kotesovec, Jun 19 2014

A178499 Number of ways to place 6 nonattacking knights on an n X n board.

Original entry on oeis.org

0, 0, 0, 170, 13384, 257318, 2774728, 20202298, 110018552, 481719518, 1781124856, 5756568738, 16676946372, 44127887910, 108192675468, 248568720338, 539925974784, 1116836380926, 2212958151968, 4220919779218
Offset: 1

Views

Author

Vaclav Kotesovec, May 28 2010

Keywords

Crossrefs

Column k=6 of A244081.

Programs

  • Mathematica
    CoefficientList[Series[- 2 x^3 (200 x^18 - 1540 x^17 + 2602 x^16 + 15442 x^15 - 98586 x^14 + 256698 x^13 - 336146 x^12 + 70977 x^11 + 587107 x^10 - 1302115 x^9 + 1569905 x^8 - 1100786 x^7 + 367130 x^6 - 212358 x^5 + 247682 x^4 + 212463 x^3 + 48293 x^2 + 5587 x + 85) / (x - 1)^13, {x, 0, 40}], x] (* Vincenzo Librandi, May 31 2013 *)

Formula

Explicit formula: a(n) = n^12/720-(3*n^10)/16+n^9/2+(1553*n^8)/144-(163*n^7)/3-(4493*n^6)/16+(4721*n^5)/2+(578777*n^4)/360-(143156*n^3)/3+(124917*n^2)/2+374990*n-899982, n >= 10.
G.f.: -2*x^4 * (200*x^18 -1540*x^17 +2602*x^16 +15442*x^15 -98586*x^14 +256698*x^13 -336146*x^12 +70977*x^11 +587107*x^10 -1302115*x^9 +1569905*x^8 -1100786*x^7 +367130*x^6 -212358*x^5 +247682*x^4 +212463*x^3 +48293*x^2 +5587*x +85) / (x-1)^13.

A172966 Number of ways to place 4 nonattacking knights on an n X n cylindrical board.

Original entry on oeis.org

0, 0, 0, 306, 2365, 19047, 90503, 328324, 981693, 2547955, 5933257, 12681288, 25284363, 47595023, 85357395, 146879312, 243867873, 392452803, 614423653, 938708560, 1403123967, 2056426383, 2960698943, 4194107208, 5854060325
Offset: 1

Views

Author

Vaclav Kotesovec, Feb 06 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^3 (76 x^13 - 684 x^12 + 2856 x^11 - 7714 x^10 + 16164 x^9 - 29151 x^8 + 45506 x^7 - 57766 x^6 + 55629 x^5 - 39385 x^4 + 21484 x^3 - 8778 x^2 + 389 x - 306) / (x - 1)^9, {x, 0, 50}], x] (* Vincenzo Librandi, May 29 2013 *)

Formula

a(n) = n*(n^7-54n^5+72n^4+1115n^3-2616n^2-8502n+26712)/24, n>=9.
G.f.: x^4*(76*x^13-684*x^12+2856*x^11-7714*x^10+16164*x^9-29151*x^8+45506*x^7-57766*x^6+55629*x^5-39385*x^4+21484*x^3-8778*x^2+389*x-306)/(x-1)^9. - Vaclav Kotesovec, Mar 25 2010

Extensions

More terms from Vincenzo Librandi, May 29 2013
Showing 1-10 of 10 results.