A172225
Number of ways to place 2 nonattacking wazirs on an n X n board.
Original entry on oeis.org
0, 2, 24, 96, 260, 570, 1092, 1904, 3096, 4770, 7040, 10032, 13884, 18746, 24780, 32160, 41072, 51714, 64296, 79040, 96180, 115962, 138644, 164496, 193800, 226850, 263952, 305424, 351596, 402810, 459420, 521792, 590304
Offset: 1
- Christian Poisson, Echecs et mathematiques, Rex Multiplex 29/1990, p. 829.
-
I:=[0, 2, 24, 96, 260]; [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 30 2013
-
[n*(n-1)*(n^2+n-4)/2: n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
-
Table[n (n - 1) (n^2 + n - 4) / 2, {n, 40}] (* Vincenzo Librandi, Apr 30 2013 *)
LinearRecurrence[{5,-10,10,-5,1},{0,2,24,96,260},40] (* Harvey P. Dale, Jun 04 2023 *)
A172134
Number of ways to place 3 nonattacking knights on an n X n board.
Original entry on oeis.org
0, 4, 36, 276, 1360, 4752, 13340, 32084, 68796, 135040, 247152, 427380, 705144, 1118416, 1715220, 2555252, 3711620, 5272704, 7344136, 10050900, 13539552, 17980560, 23570764, 30535956, 39133580, 49655552, 62431200, 77830324
Offset: 1
- E. Bonsdorff, K. Fabel, O. Riihimaa, Schach und Zahl, 1966, p. 51-63
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Vaclav Kotesovec, Number of ways of placing non-attacking queens and kings on boards of various sizes
- Index entries for linear recurrences with constant coefficients, signature (7,-21,35,-35,21,-7,1).
-
[n le 3 select (n*(n-1))^2 else (n-2)*(n+5)*(n^4 -3*n^3 -8*n^2 +66*n -108)/6: n in [1..50]]; // G. C. Greubel, Apr 18 2022
-
CoefficientList[Series[4x(3x^8 -20x^7 +43x^6 -38x^5 +23x^4 -11x^3 -27x^2 -2x -1)/ (x-1)^7, {x, 0, 40}], x] (* Vincenzo Librandi, May 02 2013 *)
-
def A172134(n):
if (n<4): return (n*(n-1))^2
else: return (n-2)*(n+5)*(n^4 -3*n^3 -8*n^2 +66*n -108)/6
[A172134(n) for n in (1..50)] # G. C. Greubel, Apr 18 2022
A172135
Number of ways to place 4 nonattacking knights on an n X n board.
Original entry on oeis.org
0, 1, 18, 412, 4436, 26133, 111066, 376560, 1080942, 2732909, 6253408, 13204356, 26100160, 48819677, 87137934, 149398608, 247349946, 397168485, 620696612, 946921684, 1413726108, 2069939461, 2977725410, 4215337872
Offset: 1
- E. Bonsdorff, K. Fabel, O. Riihimaa, Schach und Zahl, 1966, p. 51-63
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Vaclav Kotesovec, Number of ways of placing non-attacking queens and kings on boards of various sizes
- Index entries for linear recurrences with constant coefficients, signature (9,-36,84,-126,126,-84,36,-9,1).
-
[0,1,18,412,4436] cat [(n^8 -54*n^6 +144*n^5 +1019*n^4 -5232*n^3 -2022*n^2 +51120*n -77184)/24: n in [6..50]]; // G. C. Greubel, Apr 19 2022
-
CoefficientList[Series[x*(1 +9*x +286*x^2 +1292*x^3 -345*x^4 +3099*x^5 -5142*x^6 +3606*x^7 -1162*x^8 -390*x^9 +690*x^10 -312*x^11 +48*x^12)/(1-x)^9, {x, 0, 40}], x] (* Vincenzo Librandi, May 26 2013 *)
-
[0,1,18,412,4436] + [(n^8 -54*n^6 +144*n^5 +1019*n^4 -5232*n^3 -2022*n^2 +51120*n -77184)/24 for n in (6..50)] # G. C. Greubel, Apr 19 2022
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
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Vaclav Kotesovec, Number of ways of placing non-attacking queens and kings on boards of various sizes
- Index entries for linear recurrences with constant coefficients, signature (11,-55,165,-330,462,-462,330,-165,55,-11,1).
-
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 *)
-
[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
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
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
...
-
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);
-
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 *)
A172141
Number of ways to place 2 nonattacking nightriders on an n X n board.
Original entry on oeis.org
0, 6, 28, 96, 240, 518, 980, 1712, 2784, 4310, 6380, 9136, 12688, 17206, 22820, 29728, 38080, 48102, 59964, 73920, 90160, 108966, 130548, 155216, 183200, 214838, 250380, 290192, 334544, 383830, 438340, 498496, 564608, 637126
Offset: 1
- Christian Poisson, Echecs et mathematiques, Rex Multiplex 29/1990, p.829
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Christopher R. H. Hanusa, T. Zaslavsky, and S. Chaiken, A q-Queens Problem. IV. Queens, Bishops, Nightriders (and Rooks), arXiv preprint arXiv:1609.00853, a12016
- Vaclav Kotesovec, Number of ways of placing non-attacking queens and kings on boards of various sizes
- Index entries for linear recurrences with constant coefficients, signature (3,-1,-5,5,1,-3,1).
-
[(n/12)*(3*(-1)^n -(11 -18*n +10*n^2 -6*n^3)): n in [1..40]]; // G. C. Greubel, Apr 21 2022
-
CoefficientList[Series[2*x*(3+2*x+x^2)*(1+x+2*x^2)/((1-x)^5*(1+x)^2), {x,0,40}], x] (* Vincenzo Librandi, May 27 2013 *)
-
[(n/12)*(3*(-1)^n -(11 -18*n +10*n^2 -6*n^3)) for n in (1..40)] # G. C. Greubel, Apr 21 2022
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
-
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 *)
A172137
Number of ways to place 2 nonattacking zebras on an n X n board.
Original entry on oeis.org
0, 6, 36, 112, 276, 582, 1096, 1896, 3072, 4726, 6972, 9936, 13756, 18582, 24576, 31912, 40776, 51366, 63892, 78576, 95652, 115366, 137976, 163752, 192976, 225942, 262956, 304336, 350412, 401526, 458032, 520296, 588696, 663622, 745476, 834672, 931636, 1036806
Offset: 1
- Christian Poisson, Echecs et mathematiques, Rex Multiplex 29/1990, p. 829.
-
[n eq 1 select 0 else (n^4 -9*n^2 +40*n -48)/2: n in [1..50]]; // G. C. Greubel, Apr 19 2022
-
CoefficientList[Series[2x(3+3*x-4*x^2+8*x^3-4*x^4)/(1-x)^55, {x, 0, 40}], x] (* Vincenzo Librandi, May 26 2013 *)
-
[(n^4 -9*n^2 +40*n -48 +16*bool(n==1))/2 for n in (1..50)] # G. C. Greubel, Apr 19 2022
A172529
Number of ways to place 2 nonattacking knights on an n X n toroidal board.
Original entry on oeis.org
0, 2, 18, 88, 200, 486, 980, 1760, 2916, 4550, 6776, 9720, 13520, 18326, 24300, 31616, 40460, 51030, 63536, 78200, 95256, 114950, 137540, 163296, 192500, 225446, 262440, 303800, 349856, 400950, 457436, 519680, 588060, 662966, 744800, 833976, 930920, 1036070
Offset: 1
-
CoefficientList[Series[2 x (16 x^7 - 71 x^6 + 121 x^5 - 98 x^4 + 40 x^3 - 9 x^2 - 4 x - 1) / (x - 1)^5, {x, 0, 50}], x] (* Vincenzo Librandi, May 29 2013 *)
A172964
Number of ways to place 2 nonattacking knights on an n X n cylindrical board.
Original entry on oeis.org
0, 4, 18, 92, 230, 522, 1022, 1808, 2970, 4610, 6842, 9792, 13598, 18410, 24390, 31712, 40562, 51138, 63650, 78320, 95382, 115082, 137678, 163440, 192650, 225602, 262602, 303968, 350030, 401130, 457622, 519872, 588258, 663170, 745010, 834192, 931142, 1036298, 1150110
Offset: 1
-
CoefficientList[Series[2 x (6 x^7 - 30 x^6 + 61 x^5 - 66 x^4 + 45 * x^3 - 21 x^2 + x - 2) / (x - 1)^5, {x, 0, 50}], x] (* Vincenzo Librandi, May 29 2013 *)
Showing 1-10 of 12 results.
Comments