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

A005635 Number of ways of placing n non-attacking bishops on an n X n board so that every square is attacked (or occupied).

Original entry on oeis.org

1, 1, 1, 1, 3, 8, 36, 110, 666, 3250, 23436, 125198, 1037520, 7241272, 66360960, 500827928, 5080370400, 45926666984, 508032504000, 4919789029480, 59256857923200, 656763542278304, 8532986822438400, 100525959568386848, 1405335514253932800, 18431883489984091552
Offset: 0

Views

Author

Keywords

Comments

From Vaclav Kotesovec, Apr 26 2012: (Start)
This sequence gives (according to the article by Robinson) the number of inequivalent solutions.
For the total number of all arrangements of n non-attacking bishops such that every square of the board is controlled by at least one bishop, see A122749.
For the total number of all arrangements of n bishops (in any position) such that every square of the board is controlled by at least one bishop, see A182333.
(End)

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    E:=proc(n) local k; if n mod 2 = 0 then k := n/2; if k mod 2 = 0 then RETURN( (k!*(k+2)/2)^2 ); else RETURN( ((k-1)!*(k+1)^2/2)^2 ); fi; else k := (n-1)/2; if k mod 2 = 0 then RETURN( ((k!)^2/12)*(3*k^3+16*k^2+18*k+8) ); else RETURN( ((k-1)!*(k+1)!/12)*(3*k^3+13*k^2-k-3) ); fi; fi; end; # Gives A122749
    unprotect(D); D:=proc(n) option remember; if n <= 1 then 1 else D(n-1)+(n-1)*D(n-2); fi; end; # Gives A000085
    C:=proc(n) local k; if n mod 2 = 0 then RETURN(0); fi; k:=(n-1)/2; if k mod 2 = 0 then RETURN( k*2^(k-1)*((k/2)!)^2 ); else RETURN( 2^k*(((k+1)/2)!)^2 ); fi; end; # Gives A122693
    Q:=proc(n) local m; if n mod 8 <> 1 then RETURN(0); fi; m:=(n-1)/8; ((2*m)!)^2/(m!)^2; end; # Gives A122747
    M:=proc(n) local k; if n mod 2 = 0 then k:=n/2; if k mod 2 = 0 then RETURN( k!*(k+2)/2 ); else RETURN( (k-1)!*(k+1)^2/2 ); fi; else k:=(n-1)/2; RETURN(D(k)*D(k+1)); fi; end; # Gives A122748
    a:=n-> if n <= 1 then RETURN(1) else E(n)/8 + C(n)/8 + Q(n)/4 + M(n)/4; fi; # Gives A005635
    # The following additional Maple programs produce A123071, A005631, A123072, A005633, A005632, A005634
    S:=proc(n) local k; if n mod 2 = 0 then RETURN(0) else k:=(n-1)/2; RETURN(B(k)*B(k+1)); fi; end; # Gives A123071
    psi:=n->S(n)/2; # Gives A005631
    zeta:=n->Q(n)/2; # Gives A123072
    mu:=n->(M(n)-S(n))/2; # Gives A005633
    chi:=n->(C(n)-S(n)-Q(n))/4; # Gives A005632
    eps:=n->E(n)/8-C(n)/8+S(n)/4-M(n)/4; # Gives A005634

Extensions

Entry revised by N. J. A. Sloane, Sep 25 2006

A122749 Number of arrangements of n non-attacking bishops on an n X n board such that every square of the board is controlled by at least one bishop.

Original entry on oeis.org

4, 2, 16, 44, 256, 768, 5184, 25344, 186624, 996480, 8294400, 57888000, 530841600, 4006195200, 40642560000, 367408742400, 4064256000000, 39358255104000, 474054819840000, 5254107586560000, 68263894056960000, 804207665479680000, 11242684107325440000
Offset: 2

Views

Author

N. J. A. Sloane, Sep 25 2006

Keywords

Crossrefs

Programs

  • Maple
    E:=proc(n) local k; if n mod 2 = 0 then k := n/2; if k mod 2 = 0 then RETURN( (k!*(k+2)/2)^2 ); else RETURN( ((k-1)!*(k+1)^2/2)^2 ); fi; else k := (n-1)/2; if k mod 2 = 0 then RETURN( ((k!)^2/12)*(3*k^3+16*k^2+18*k+8) ); else RETURN( ((k-1)!*(k+1)!/12)*(3*k^3+13*k^2-k-3) ); fi; fi; end;
  • Mathematica
    Table[If[n==1,1,1/768*(2*(3*n^3+23*n^2+17*n+21)*(((n-1)/2)!)^2*(1-(-1)^n+2*Sin[(Pi*n)/2])-2*(3*n^3+17*n^2-47*n+3)*((n-3)/2)!*((n+1)/2)!*((-1)^n+2*Sin[(Pi*n)/2]-1)+3*(n+2)^4*((n/2-1)!)^2*((-1)^n-2*Cos[(Pi*n)/2]+1)+12*(n+4)^2*((n/2)!)^2*((-1)^n+2*Cos[(Pi*n)/2]+1))],{n,2,25}] (* Vaclav Kotesovec, Apr 26 2012 *)
    a[n_] := Module[{k}, If[Mod[n, 2]==0, k = n/2; If[Mod[k, 2]==0, (k!*(k+2) /2)^2, ((k-1)!*(k+1)^2/2)^2], k = (n-1)/2; If[Mod[k, 2]==0, ((k!)^2/12)* (3*k^3+16*k^2+18*k+8), ((k-1)!*(k+1)!/12)*(3*k^3+13*k^2-k-3)]]];
    Table[a[n], {n, 2, 25}] (* Jean-François Alcover, Jul 23 2022, after Maple code *)

Formula

From Andy Huchala, Mar 22 2024 (based on Mathematica code): (Start)
a(4*n) = (n+1)^2*((2*n)!)^2.
a(4*n+1) = (1/3)*(n+2)*(1+4*n+6*n^2)*((2*n)!)^2.
a(4*n+2) = 4*(n+1)^4*((2*n)!)^2.
a(4*n+3) = (1/3)*(3+17*n+22*n^2+6*n^3)*(2*n)!*(2*n+2)!. (End)

Extensions

New name from Vaclav Kotesovec, Apr 26 2012

A002564 Number of different ways one can attack all squares on an n X n chessboard using the minimum number of queens.

Original entry on oeis.org

1, 4, 1, 12, 186, 4, 86, 4860, 114, 8, 2, 8, 288, 4632, 205832, 2968, 124, 16, 84
Offset: 1

Views

Author

Keywords

Comments

Number of distinct solutions to minimum dominating set on queens' graph Q(n). See A002563 for non-isomorphic solutions.
For same problem, but with non-attacking queens, see A002568. - Vaclav Kotesovec, Sep 07 2012
In other words, number of minimum dominating sets in the n X n queen graph. - Eric W. Weisstein, Dec 31 2017
For n > 2, also the number of minimal edge covers in the n X n queen graph. - Eric W. Weisstein, Dec 09 2024
a(20) >= 4152. - Eric W. Weisstein, Jul 28 2025

References

  • W. Ahrens, Mathematische Unterhaltungen und Spiele, second edition (1910), Vol. 1, p. 301.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A075458 gives number of queens required. - Sean A. Irvine, Apr 05 2014

Extensions

New name of the sequence from Vaclav Kotesovec, Sep 07 2012
a(9)-a(10) from Vaclav Kotesovec, Sep 07 2012
a(11) from Svyatoslav Starkov, Sep 16 2013
a(12)-a(13) from Sean A. Irvine, Apr 07 2014
Definition edited by N. J. A. Sloane, Dec 25 2017 at the suggestion of Brendan McKay.
a(14) from Andy Huchala, Mar 13 2024
a(15)-a(19) from Mia Muessig, Oct 04 2024

A323500 Number of minimum dominating sets in the n X n black bishop graph.

Original entry on oeis.org

1, 2, 1, 5, 52, 22, 6, 108, 2964, 672, 120, 4680, 245520, 38160, 5040, 342720, 29292480, 3467520, 362880, 38102400, 4819046400, 460857600, 39916800, 5987520000, 1050690009600, 84304281600, 6227020800, 1264085222400, 293878019635200, 20312541849600
Offset: 1

Views

Author

Eric W. Weisstein, Jan 16 2019

Keywords

Crossrefs

Cf. A182333 (bishop graph), A323501 (white bishop graph).

Programs

  • Mathematica
    Table[Piecewise[{{1, n == 1}, {(n/2)! (n + 1)/2, Mod[n, 4] == 0}, {((n - 1)/2)! (n^3 + 3 n^2 + 2 n - 2)/8, Mod[n, 4] == 1}, {(n/2 - 1)! (n^2 + n + 2)/4, Mod[n, 4] == 2}, {((n - 1)/2)!, Mod[n, 4] == 3}}], {n, 20}] (* Eric W. Weisstein, Feb 27 2025 *)
  • PARI
    \\ See A286886 for DomSetCount, Bishop.
    a(n)={Vec(DomSetCount(Bishop(n, 0), x + O(x^((n+3)\2))))[1]} \\ Andrew Howroyd, Sep 08 2019
    
  • PARI
    a(n)=if(n==1, 1, (n\4*2)!*if(n%4<2, if(n%2==0, (n+1)/2, (n^3 + 3*n^2 + 2*n - 2)/8), if(n%2==0, (n^2+n+2)/4, (n-1)/2))); \\ Andrew Howroyd, Sep 09 2019

Formula

From Andrew Howroyd, Sep 09 2019: (Start)
a(n) = (n/2)! * (n + 1)/2 for n mod 4 = 0;
a(n) = ((n-1)/2)! * (n^3 + 3*n^2 + 2*n - 2)/8 for n mod 4 = 1, n > 1;
a(n) = (n/2-1)! * (n^2 + n + 2)/4 for n mod 4 = 2;
a(n) = ((n-1)/2)! for n mod 4 = 3.
(End)

Extensions

Terms a(11) and beyond from Andrew Howroyd, Sep 08 2019

A323501 Number of minimum dominating sets in the n X n white bishop graph.

Original entry on oeis.org

2, 6, 5, 2, 22, 356, 108, 24, 672, 25056, 4680, 720, 38160, 2531520, 342720, 40320, 3467520, 358444800, 38102400, 3628800, 460857600, 68388364800, 5987520000, 479001600, 84304281600, 16979648716800, 1264085222400, 87178291200, 20312541849600
Offset: 2

Views

Author

Eric W. Weisstein, Jan 16 2019

Keywords

Crossrefs

Cf. A182333 (bishop graph), A323500 (black bishop graph).

Programs

  • Mathematica
    Table[Piecewise[{{(n/2)! (n + 1)/2, Mod[n, 4] == 0}, {((n - 1)/2)!, Mod[n, 4] == 1}, {(n/2 - 1)! (n^2 + n + 2)/4, Mod[n, 4] == 2}, {((n - 3)/2)! (n + 1) (n^3 + n^2 - 6 n + 6)/16, Mod[n, 4] == 3}}], {n, 2, 20}] (* Eric W. Weisstein, Feb 27 2025 *)
  • PARI
    \\ See A289170 for DomSetCount, Bishop.
    a(n)={Vec(DomSetCount(Bishop(n, 1), x + O(x^((n+3)\2))))[1]} \\ Andrew Howroyd, Sep 08 2019
    
  • PARI
    a(n)=(n\4*2)!*if(n%4<2, if(n%2==0, (n + 1)/2, 1), if(n%2==0, (n^2 + n + 2)/4, (n + 1)*(n^3 + n^2 - 6*n + 6)/16)); \\ Andrew Howroyd, Sep 09 2019

Formula

From Andrew Howroyd, Sep 09 2019: (Start)
a(n) = (n/2)! * (n + 1)/2 for n mod 4 = 0;
a(n) = ((n-1)/2)! for n mod 4 = 1;
a(n) = (n/2-1)! * (n^2 + n + 2)/4 for n mod 4 = 2;
a(n) = ((n-3)/2)! * (n + 1)*(n^3 + n^2 - 6*n + 6)/16 for n mod 4 = 3.
(End)

Extensions

Offset corrected and terms a(11) and beyond from Andrew Howroyd, Sep 08 2019

A295899 Number of minimal dominating sets in the n X n bishop graph.

Original entry on oeis.org

1, 4, 30, 361, 6552, 180625, 6768900, 330039889, 20267217352, 1535068962441
Offset: 1

Views

Author

Eric W. Weisstein, Nov 29 2017

Keywords

Crossrefs

Formula

a(n) = A286886(n) * A287897(n). - Andrew Howroyd, Nov 30 2017

Extensions

a(6)-a(10) from Andrew Howroyd, Nov 30 2017
Showing 1-6 of 6 results.