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-9 of 9 results.

A172228 Number of ways to place 5 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 0, 1, 304, 10741, 127960, 870589, 4197456, 16005187, 51439096, 145085447, 369074128, 863338777, 1883786680, 3875953561, 7583888944, 14206566327, 25617069208, 44663199283, 75572017136, 124485188701, 200156902936, 314851577749, 485484612496, 735056106571, 1094434774968
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^2 (6 x^11 - 26 x^10 - 93 x^9 + 527 x^8 + 490 x^7 - 6710 x^6 + 13630 x^5 - 3954 x^4 - 26364 x^3 - 7452 x^2 - 293 x - 1) / (x - 1)^11, {x, 0, 50}], x] (* Vincenzo Librandi, May 28 2013 *)

Formula

a(n) = (n^10-50n^8+40n^7+995n^6-1560n^5-8890n^4+21080n^3+24264n^2-97440n+59520)/120, n>=4.
For any fixed value of k > 1, a(n) = n^(2k)/k! - 5/2/(k-2)!*n^(2k-2) + ...
G.f.: x^3 * (6*x^11 -26*x^10 -93*x^9 +527*x^8 +490*x^7 -6710*x^6 +13630*x^5 -3954*x^4 -26364*x^3 -7452*x^2 -293*x -1) / (x-1)^11. - Vaclav Kotesovec, Apr 29 2011
a(n) = A232833(n,5). - R. J. Mathar, Apr 11 2024

Extensions

Corrected a(4) and g.f., Vaclav Kotesovec, Apr 29 2011.
More terms from Vincenzo Librandi, May 28 2013

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

A172214 Number of ways to place 5 nonattacking knights on a 5 X n board.

Original entry on oeis.org

1, 28, 259, 1968, 9386, 30842, 82738, 192336, 400277, 763984, 1360797, 2291056, 3681226, 5687022, 8496534, 12333352, 17459691, 24179516, 32841667, 43842984, 57631432, 74709226, 95635956, 121031712, 151580209
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(42 x^12 - 52 x^11 - 268 x^10 + 884 x^9 - 268 x^8 - 1188 x^7 + 2834 x^6 - 720 x^5 + 918 x^4 + 814 x^3 + 106 x^2 + 22 x + 1) / (x - 1)^6, {x, 0, 50}], x] (* Vincenzo Librandi, May 27 2013 *)

Formula

a(n) = (625n^5-8250n^4+57235n^3-242778n^2+608440n-705984)/24, n>=8.
G.f.: x * (42*x^12 -52*x^11 -268*x^10 +884*x^9 -268*x^8 -1188*x^7 +2834*x^6 -720*x^5 +918*x^4 +814*x^3 +106*x^2 +22*x +1) / (x-1)^6. - Vaclav Kotesovec, Mar 25 2010

A172140 Number of ways to place 5 nonattacking zebras on an n X n board.

Original entry on oeis.org

0, 0, 126, 2032, 20502, 160696, 929880, 4117520, 15037036, 47368960, 132577826, 336828368, 789558314, 1729320120, 3574328936, 7027309888, 13226773092, 23959787480, 41954706558, 71276149776, 117848892710, 190142197976
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 26 2010

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[2x^2(100x^19 -648x^18 +1450x^17 -2126x^16 +10452x^15 - 43872x^14 +92798x^13 -100834x^12 +56460x^11 -61636x^10 +182288x^9 -303224x^8 + 275038x^7 -128982x^6 +21681x^5 +1933x^4 -13072x^3 -2540x^2 -323x-63)/(x-1)^11, {x, 0, 40}], x] (* Vincenzo Librandi, May 27 2013 *)
  • SageMath
    [0,0,126,2032,20502,160696,929880,4117520,15037036,47368960,132577826] + [(n^10 -90*n^8 +400*n^7 +2915*n^6 -26880*n^5 +2430*n^4 +609920*n^3 - 1517496*n^2 -4188480*n +16581120)/120 for n in (12..50)] # G. C. Greubel, Apr 19 2022

Formula

a(n) = (n^10 - 90*n^8 + 400*n^7 + 2915*n^6 - 26880*n^5 + 2430*n^4 + 609920*n^3 - 1517496*n^2 - 4188480*n + 16581120)/120, n >= 12.
For any fixed value of k > 1, a(n) = n^(2k) /k! - 9n^(2k - 2) /2/(k - 2)! + 20n^(2k - 3) /(k - 2)! + ...
G.f.: 2*x^3 * (100*x^19 -648*x^18 +1450*x^17 -2126*x^16 +10452*x^15 -43872*x^14 +92798*x^13 -100834*x^12 +56460*x^11 -61636*x^10 +182288*x^9 -303224*x^8 +275038*x^7 -128982*x^6 +21681*x^5 +1933*x^4 -13072*x^3 -2540*x^2 -323*x -63) / (x-1)^11. - Vaclav Kotesovec, Mar 25 2010

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

Original entry on oeis.org

0, 0, 0, 128, 120, 30312, 283906, 1872064, 8643186, 31702920, 98179400, 267487920, 659015500, 1496908840, 3179369070, 6382030592, 12207535134, 22396355496, 39617305308, 67860021680
Offset: 1

Views

Author

Vaclav Kotesovec, Feb 06 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- 2 x^3 (648 x^16 - 10328 x^15 + 71820 x^14 - 295572 x^13 + 818512 x^12 - 1640088 x^11 + 2492742 x^10 - 2967118 x^9 + 2825821 x^8 - 2185007 x^7 + 1376780 x^6 - 677852 x^5 + 219349 x^4 - 32023 x^3 + 18016 x^2 - 644 x + 64) / (x - 1)^11, {x, 0, 50}], x] (* Vincenzo Librandi, May 29 2013 *)

Formula

a(n) = n^2*(n^8 - 90*n^6 + 3395*n^4 - 64290*n^2 + 522504)/120, n>=10.
G.f.: -2*x^4*(648*x^16-10328*x^15+71820*x^14-295572*x^13+818512*x^12-1640088*x^11+2492742*x^10-2967118*x^9+2825821*x^8-2185007*x^7+1376780*x^6-677852*x^5+219349*x^4-32023*x^3+18016*x^2-644*x+64)/(x-1)^11. - Vaclav Kotesovec, Mar 25 2010

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

Original entry on oeis.org

2, 49, 1244, 12329, 81900, 398907, 1562362, 5153001, 14907120, 38753358, 92417760, 204977323, 427812496, 847346181, 1604300270
Offset: 3

Views

Author

Heinrich Ludwig, Jun 19 2014

Keywords

Crossrefs

Formula

a(n) = (n^10 - 90*n^8 + 240*n^7 + 3235*n^6)/960 + O(n^5) for n >= 8.

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.

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

Original entry on oeis.org

0, 0, 0, 208, 3210, 58056, 458157, 2524176, 10587591, 36576380, 109008735, 289450344, 700477401, 1570789892, 3304892985, 6586928032, 12530769343, 22891446252
Offset: 1

Views

Author

Vaclav Kotesovec, Feb 06 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- x^3 (468 x^16 - 7964 x^15 + 57164 x^14 - 238936 x^13 + 664383 x^12 - 1323653 x^11 + 1986964 x^10 - 2334676 x^9 + 2209082 x^8 - 1718662 x^7 + 1118210 x^6 - 595746 x^5 + 216519 x^4 - 38229 x^3 + 34186 x^2 + 922 x + 208) / (x - 1)^11, {x, 0, 50}], x] (* Vincenzo Librandi, May 29 2013 *)

Formula

Explicit formula: a(n) = n*(n^9-90n^7+120n^6+3395n^5-8160n^4-62130n^3+204000n^2+463464n-1888080)/120, n>=10. For any fixed value of k > 1, a(n) = n^(2k)/k! - 9n^(2k-2)/2/(k-2)! + 6n^(2k-3)/(k-2)! + ... [Vaclav Kotesovec, Jan 31 2010]
G.f.: -x^4*(468*x^16-7964*x^15+57164*x^14-238936*x^13+664383*x^12-1323653*x^11+1986964*x^10-2334676*x^9+2209082*x^8-1718662*x^7+1118210*x^6-595746*x^5+216519*x^4-38229*x^3+34186*x^2+922*x+208)/(x-1)^11. [Vaclav Kotesovec, Mar 25 2010]
Showing 1-9 of 9 results.