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.

Previous Showing 11-20 of 22 results. Next

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

A000902 Expansion of e.g.f. (1/2)*(exp(2*x + x^2) + 1).

Original entry on oeis.org

1, 1, 3, 10, 38, 156, 692, 3256, 16200, 84496, 460592, 2611104, 15355232, 93376960, 585989952, 3786534784, 25152768128, 171474649344, 1198143415040, 8569374206464, 62668198184448, 468111364627456, 3568287053001728
Offset: 0

Views

Author

Keywords

Comments

Number of solutions to the rook problem on a 2n X 2n board having a certain symmetry group (see Robinson for details).
One more than the number of ordered pairs of minimally intersecting partitions such that p consists of exactly two blocks.
The number of B-orbits in the symmetric space of type DIII, SO_{2n}(C)/GL_n(C) where B is a Borel subgroup of SO_{2n}(C). These are parameterized by "type DIII (n,n)-clans". E.g., for n=2, the a(2)=3 type DIII (2,2)-clans are ++--, --++, and 1212. See [Bingham and Ugurlu] link. - Aram Bingham, Feb 08 2020

References

  • L. C. Larson, The number of essentially different nonattacking rook arrangements, J. Recreat. Math., 7 (No. 3, 1974), circa pages 180-181.
  • R. W. Robinson, Counting arrangements of bishops, pp. 198-214 of Combinatorial Mathematics IV (Adelaide 1975), Lect. Notes Math., 560 (1976).
  • 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

Equals 1/2 * A000898(n) for n>0.

Programs

  • Haskell
    a000902 n = a000902_list !! n
    a000902_list = 1 : 1 : 3 : map (* 2) (zipWith (+)
       (drop 2 a000902_list) (zipWith (*) [2..] $ tail a000902_list))
    -- Reinhard Zumkeller, Sep 10 2013
    
  • Magma
    a:=[1,3]; [1] cat [n le 2 select a[n] else 2*Self(n-1) + (2*n-2)*Self(n-2):n in [1..22]]; // Marius A. Burtea, Feb 12 2020
  • Maple
    # Comment from the authors: For Maple program see A000903.
    A000902 := n -> `if`(n=0, 1, I^(-n)*orthopoly[H](n, I)/2):
    seq(A000902(n), n=0..22); # Peter Luschny, Nov 29 2017
  • Mathematica
    n = 22; CoefficientList[ Series[(1/2)*(Exp[2*x+x^2] + 1), {x, 0, n}], x] * Table[k!, {k, 0, n}]
    (* Jean-François Alcover, May 18 2011 *)
    With[{nn=30},CoefficientList[Series[(Exp[2x+x^2]+1)/2,{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Jul 27 2025 *)

Formula

a(n) = 2*a(n-1) + (2n-2)*a(n-2) for n >= 3. - N. J. A. Sloane, Sep 23 2006
a(n) = 1 + n!/(2e) * [x^n] Sum[l>=0, 1/l! * {(1+x)^l-1}^2].
For asymptotics see the Robinson paper.
But the asymptotic formula in the Robinson paper is wrong (see A000898, discussion from Oct 01 2013). - Vaclav Kotesovec, Aug 04 2014
a(n) ~ 2^(n/2-3/2) * n^(n/2) * exp(sqrt(2*n)-n/2-1/2). - Vaclav Kotesovec, Aug 04 2014
a(n) = (i/2)^(1 - n)*KummerU((1 - n)/2, 3/2, -1) for n>=1. - Peter Luschny, Nov 29 2017
a(n) = Sum_{r=0..floor(n/2)} 2^(n-2r-1) * {(n!)/(r!(n-2r)!)}. - Aram Bingham, Feb 08 2020

A000901 Number of solutions to the rook problem on a 2n X 2n board having a certain symmetry group (see Robinson for details).

Original entry on oeis.org

0, 0, 7, 74, 882, 11144, 159652, 2571960, 46406392, 928734944, 20436096048, 490489794464, 12752891909920, 357081983435904, 10712466529388608, 342798976818878336, 11655165558112403328, 419585962575107694080
Offset: 1

Views

Author

Keywords

References

  • L. C. Larson, The number of essentially different nonattacking rook arrangements, J. Recreat. Math., 7 (No. 3, 1974), circa pages 180-181.
  • R. W. Robinson, Counting arrangements of bishops, pp. 198-214 of Combinatorial Mathematics IV (Adelaide 1975), Lect. Notes Math., 560 (1976).
  • 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).

Programs

  • Maple
    For Maple program see A000903.

Formula

For asymptotics see the Robinson paper.

Extensions

Corrected and extended by Sean A. Irvine, Aug 23 2011

A122670 If n mod 4 = 2 or n mod 4 = 3 then a(n) = 0 else let m=floor(n/4), then a(n) = (2*m)!/m!.

Original entry on oeis.org

1, 1, 0, 0, 2, 2, 0, 0, 12, 12, 0, 0, 120, 120, 0, 0, 1680, 1680, 0, 0, 30240, 30240, 0, 0, 665280, 665280, 0, 0, 17297280, 17297280, 0, 0, 518918400, 518918400, 0, 0, 17643225600, 17643225600, 0, 0, 670442572800, 670442572800, 0, 0, 28158588057600, 28158588057600, 0, 0, 1295295050649600
Offset: 0

Views

Author

N. J. A. Sloane, Sep 23 2006

Keywords

Comments

Number of solutions to the rook problem on an n X n board having a certain symmetry group (see Robinson for details).
A037224 is an essentially identical sequence.

References

  • R. W. Robinson, Counting arrangements of bishops, pp. 198-214 of Combinatorial Mathematics IV (Adelaide 1975), Lect. Notes Math., 560 (1976).

Crossrefs

If the duplicates and zeros are omitted we get A001813.

Programs

  • Maple
    R:=proc(n) local m; if n mod 4 = 2 or n mod 4 = 3 then RETURN(0); fi; m:=floor(n/4); (2*m)!/m!; end;
    For Maple program see A000903.
  • Mathematica
    Table[If[MemberQ[{2,3},Mod[n,4]],0,((2Floor[n/4])!/Floor[n/4]!)],{n,0,50}] (* Harvey P. Dale, Dec 30 2023 *)

Formula

For asymptotics see the Robinson paper.
a(n) = (1/2 + (-1)^(n/2 - 1/4 + (-1)^n/4)/2) * ((n/2 - 3/4 + (-1)^n/4 + (-1)^(n/2 - 1/4 + (-1)^n/4)/2)! / ((n/4 - 3/8 + (-1)^n/8 + (-1)^(n/2 - 1/4 + (-1)^n/4)/4)!)). - Wesley Ivan Hurt, Mar 30 2015

A123071 Bishops on a 2n+1 X 2n+1 board (see Robinson paper for details).

Original entry on oeis.org

1, 2, 4, 12, 36, 120, 400, 1520, 5776, 23712, 97344, 431808, 1915456, 9012608, 42406144, 210988800, 1049760000, 5475340800, 28558296064, 155672726528, 848579961856, 4810614454272, 27271456395264, 160376430784512, 943132599095296, 5735299537018880
Offset: 0

Views

Author

N. J. A. Sloane, Sep 28 2006

Keywords

Crossrefs

Programs

  • Maple
    For Maple program see A005635.
    # alternative
    # this is A000898, replicated as 1,1,2,2,6,6,20,20,76,76,...
    B := proc(n)
        if n=0 or n= -2 then
            1 ;
        elif type (n,'odd') then
            procname(n-1) ;
        else
            2*procname(n-2)+(n-2)*procname(n-4) ;
        end if;
    end proc:
    A123071 := proc(n)
        B(n)*B(n+1) ;
    end proc:
    seq(A123071(n),n=0..20) ; # R. J. Mathar, Apr 02 2017
  • Mathematica
    B[n_] := B[n] = Which[n == 0 || n == -2, 1, OddQ[n], B[n-1], True, 2*B[n-2] + (n-2)*B[n-4]];
    a[n_] := B[n]*B[n+1];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Jul 23 2022, after R. J. Mathar *)

Formula

Conjecture: 2*a(n) +a(n-1) -2*n*a(n-2) +(-n-10)*a(n-3) -2*(n-2)*(n+2)*a(n-4) +(-n^2-2*n+23)*a(n-5) +2*(n-5)*(n^2-7*n+11)*a(n-6) +(n-6)*(n-5)^2*a(n-7)=0. - R. J. Mathar, Apr 02 2017

A005631 Bishops on a 2n+1 X 2n+1 board (see Robinson paper for details).

Original entry on oeis.org

1, 2, 6, 18, 60, 200, 760, 2888, 11856, 48672, 215904, 957728, 4506304, 21203072, 105494400, 524880000, 2737670400, 14279148032, 77836363264, 424289980928, 2405307227136, 13635728197632, 80188215392256, 471566299547648, 2867649768509440, 17438513317683200
Offset: 0

Views

Author

Keywords

References

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

Crossrefs

Equals A123071(n)/2, n >= 1.
Cf. A005635.

Programs

  • Maple
    For Maple program see A005635.
  • Mathematica
    B[n_] := B[n] = Which[n == 0 || n == -2, 1, OddQ[n], B[n - 1], True, 2*B[n - 2] + (n - 2)*B[n - 4]];
    a[n_] := B[n + 1]*B[n + 2]/2;
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Jul 23 2022, after Maple code for A123071 *)

Extensions

More terms from N. J. A. Sloane, Sep 28 2006

A005632 Bishops on a 2n+1 X 2n+1 board (see Robinson paper for details).

Original entry on oeis.org

0, 0, 5, 22, 258, 1628, 18052, 145976, 1837272, 18407664, 265312848, 3184567136, 52020223648, 728304073664, 13317701313600, 213083801827200, 4314950946864000, 77669134543011584, 1725980887361498368, 34519618313219995136, 835374767116711506432, 18378244896208168541184
Offset: 1

Views

Author

Keywords

References

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

Programs

  • Maple
    For Maple program see A005635.
  • Mathematica
    c[n_] := Module[{k}, If[Mod[n, 2]==0, Return[0]]; k = (n-1)/2; If[Mod[k, 2] == 0, Return[k*2^(k-1)*((k/2)!)^2], Return[2^k*(((k+1)/2)!)^2]]];
    d[n_] := d[n] = If[n <= 1, 1, d[n - 1] + (n - 1)*d[n - 2]];
    B[n_] := B[n] = Which[n == 0 || n == -2, 1, OddQ[n], B[n-1], True, 2*B[n-2] + (n - 2)*B[n - 4]];
    S[n_] := S[n] = Module[{k}, If[Mod[n, 2]==0, 0, k = (n-1)/2; B[k]*B[k+1]]];
    Q[n_] := Module[{m}, If[Mod[n, 8] != 1, Return[0]]; m = (n-1)/8; ((2*m)!)^2 /(m!)^2];
    a[n_] := (c[2n+1] - S[2n+1] - Q[2n+1])/4;
    Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Jul 23 2022, after Maple program in A005635 *)

Extensions

More terms from N. J. A. Sloane, Sep 28 2006

A005633 Bishops on an n X n board (see Robinson paper for details).

Original entry on oeis.org

0, 1, 0, 2, 2, 8, 14, 36, 112, 216, 928, 1440, 8616, 11520, 87864, 100800, 997952, 1008000, 12427904, 10886400, 169435936, 130636800, 2501216992, 1676505600, 39837528576, 23471078400, 679494214656, 348713164800, 12370158205568, 5579410636800, 239109033342848
Offset: 1

Views

Author

Keywords

References

  • R. W. Robinson, Counting arrangements of bishops, pp. 198-214 of Combinatorial Mathematics IV (Adelaide 1975), Lect. Notes Math., 560 (1976). [The sequence mu(n).]
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Programs

  • Maple
    For Maple program see A005635.
  • Mathematica
    d[n_] := d[n] = If[n <= 1, 1, d[n - 1] + (n - 1)*d[n - 2]];
    M[n_] := Module[{k}, If[Mod[n, 2] == 0, k = n/2; If[Mod[k, 2] == 0, Return[k!*(k + 2)/2], Return[(k - 1)!*(k + 1)^2/2]], k = (n - 1)/2; Return[d[k]*d[k + 1]]]];
    B[n_] := B[n] = Which[n == 0 || n == -2, 1, OddQ[n], B[n - 1], True, 2*B[n - 2] + (n - 2)*B[n - 4]];
    S[n_] := S[n] = Module[{k}, If[Mod[n, 2]==0, 0, k = (n-1)/2; B[k]*B[k+1]]];
    a[n_] := (M[n] - S[n])/2;
    Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Jul 23 2022, after Maple program in A005635 *)

Extensions

More terms from N. J. A. Sloane, Sep 28 2006

A005634 Bishops on an n X n board (see Robinson paper for details).

Original entry on oeis.org

0, 0, 1, 4, 28, 85, 630, 3096, 23220, 123952, 1036080, 7230828, 66349440, 500721252, 5080269600, 45925520096, 508031496000, 4919774752448, 59256847036800, 656763354386032, 8532986691801600, 100525956801641104, 1405335512577427200, 18431883446961030912
Offset: 2

Views

Author

Keywords

Comments

The problem of the bishops is to determine the number of inequivalent arrangements of n bishops on an n X n chessboard such that no bishop threatens another and every unoccupied square is threatened by some bishop. Two arrangements are considered equivalent if they are isomorphic by way of one of the eight symmetries of the chessboard. - Jean-François Alcover, Jul 24 2022 (after Robinson's paper).

References

  • R. W. Robinson, Counting arrangements of bishops, pp. 198-214 of Combinatorial Mathematics IV (Adelaide 1975), Lect. Notes Math., 560 (1976). [The sequence epsilon(n) page 212.]
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Programs

  • Maple
    For Maple program see A005635.
  • Mathematica
    e[n_] := Module[{k}, If[Mod[n, 2] == 0, k = n/2; If[Mod[k, 2] == 0, Return[(k!*(k + 2)/2)^2], Return[((k - 1)!*(k + 1)^2/2)^2]], k = (n - 1)/2; If[Mod[k, 2] == 0, Return[((k!)^2/12)*(3*k^3 + 16*k^2 + 18*k + 8)], Return[((k - 1)!*(k + 1)!/12)*(3*k^3 + 13*k^2 - k - 3)]]]];
    c[n_] := Module[{k}, If[Mod[n, 2]==0, Return[0]]; k = (n-1)/2; If[Mod[k, 2] == 0, Return[k*2^(k-1)*((k/2)!)^2], Return[2^k*(((k+1)/2)!)^2]]];
    d[n_] := d[n] = If[n <= 1, 1, d[n - 1] + (n - 1)*d[n - 2]];
    B[n_] := B[n] = Which[n == 0 || n == -2, 1, OddQ[n], B[n - 1], True, 2*B[n - 2] + (n - 2)*B[n - 4]];
    S[n_] := S[n] = Module[{k}, If[Mod[n, 2]==0, 0, k = (n-1)/2; B[k]*B[k+1]]];
    M[n_] := Module[{k}, If[Mod[n, 2] == 0, k = n/2; If[Mod[k, 2] == 0, Return[k!*(k + 2)/2], Return[(k - 1)!*(k + 1)^2/2]], k = (n - 1)/2; Return[d[k]*d[k + 1]]]];
    a[n_] := e[n]/8 - c[n]/8 + S[n]/4 - M[n]/4;
    Table[a[n], {n, 2, 30}] (* Jean-François Alcover, Jul 23 2022, after Maple program in A005635 *)

Extensions

More terms from N. J. A. Sloane, Sep 28 2006

A122693 Bishops on an n X n board (see Robinson paper for details).

Original entry on oeis.org

0, 2, 4, 32, 128, 1152, 6912, 73728, 589824, 7372800, 73728000, 1061683200, 12740198400, 208089907200, 2913258700800, 53271016243200, 852336259891200, 17259809262796800, 310676566730342400, 6903923705118720000, 138078474102374400000, 3341499073277460480000
Offset: 0

Views

Author

N. J. A. Sloane, Sep 25 2006

Keywords

References

  • R. W. Robinson, Counting arrangements of bishops, pp. 198-214 of Combinatorial Mathematics IV (Adelaide 1975), Lect. Notes Math., 560 (1976). (C_{2n+1}, Eq. (20))

Programs

  • Maple
    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; [seq(C(2*n+1),n=0..30)];
  • Mathematica
    c[n_] := Module[{k}, If[Mod[n, 2] == 0, 0, k = (n-1)/2; If[Mod[k, 2] == 0, k*2^(k-1)*((k/2)!)^2, 2^k*(((k+1)/2)!)^2]]];
    a[n_] := c[2n+1];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jul 23 2022, after Maple code *)
Previous Showing 11-20 of 22 results. Next