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.

A000903 Number of inequivalent ways of placing n nonattacking rooks on n X n board up to rotations and reflections of the board.

Original entry on oeis.org

1, 1, 2, 7, 23, 115, 694, 5282, 46066, 456454, 4999004, 59916028, 778525516, 10897964660, 163461964024, 2615361578344, 44460982752488, 800296985768776, 15205638776753680, 304112757426239984, 6386367801916347184
Offset: 1

Views

Author

Keywords

Examples

			For n=4 the 7 solutions may be taken to be 1234,1243,1324,1423,1432,2143,2413.
		

References

  • L. C. Larson, The number of essentially different nonattacking rook arrangements, J. Recreat. Math., 7 (No. 3, 1974), circa pages 180-181.
  • R. C. Read, personal communication.
  • 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).
  • Z. Stankova and J. West, A new class of Wilf-equivalent permutations, J. Algeb. Combin., 15 (2002), 271-290.

Crossrefs

Programs

  • Maple
    Maple programs for A000142, A037223, A122670, A001813, A000085, A000898, A000407, A000902, A000900, A000901, A000899, A000903
    P:=n->n!; # Gives A000142
    G:=proc(n) local k; k:=floor(n/2); k!*2^k; end; # Gives A037223, A000165
    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; # Gives A122670, A001813
    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
    B:=proc(n) option remember; if n <= 1 then RETURN(1); fi; if n mod 2 = 1 then RETURN(B(n-1)); fi; 2*B(n-2) + (n-2)*B(n-4); end; # Gives A000898 (doubled up)
    rho:=n->R(n)/2; # Gives A000407, aerated
    beta:=n->B(n)/2; # Gives A000902, doubled up
    delta:=n->(D(n)-B(n))/2; # Gives A000900
    unprotect(gamma); gamma:=n-> if n <= 1 then RETURN(0) else (G(n)-B(n)-R(n))/4; fi; # Gives A000901, doubled up
    alpha:=n->P(n)/8-G(n)/8+B(n)/4-D(n)/4; # Gives A000899
    unprotect(sigma); sigma:=n-> if n <= 1 then RETURN(1); else P(n)/8+G(n)/8+R(n)/4+D(n)/4; fi; #Gives A000903
  • Mathematica
    c[n_] := Floor[n/2]! 2^Floor[n/2];
    r[n_] := If[Mod[n, 4] > 1, 0, m = Floor[n/4]; If[m == 0, 1, (2 m)!/m!]];
    d[0] = d[1] = 1; d[n_] := d[n] = (n - 1)d[n - 2] + d[n - 1];
    a[1] = 1; a[n_] := (n! + c[n] + 2 r[n] + 2 d[n])/8;
    Array[a, 21] (* Jean-François Alcover, Apr 06 2011, after Matthias Engelhardt, further improved by Robert G. Wilson v *)

Formula

If n>1 then a(n) = 1/8 * (F(n) + C(n) + 2 * R(n) + 2 * D(n)), where F(n) = A000142(n) [all solutions, i.e., factorials], C(n) = A037223(n) [central symmetric solutions], R(n) = A037224(n) [rotationally symmetric solutions] and D(n) = A000085(n) [symmetric solutions by reflection at a diagonal]. - Matthias Engelhardt, Apr 05 2000
For asymptotics see the Robinson paper.

Extensions

More terms from David W. Wilson, Jul 13 2003

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

A182333 Number of arrangements of n bishops such that every square of the board is controlled by at least one bishop.

Original entry on oeis.org

1, 4, 6, 25, 104, 484, 2136, 11664, 71136, 451584, 3006720, 21902400, 176774400, 1456185600, 12758860800, 117456998400, 1181072793600, 12023694950400, 130072449024000, 1451792885760000, 17487355576320000, 212389727477760000, 2729844680048640000
Offset: 1

Views

Author

Vaclav Kotesovec, Apr 25 2012

Keywords

Comments

Number of minimum dominating sets in the n X n bishop graph. - Eric W. Weisstein, Jun 04 2017

References

  • A. M. Yaglom and I. M. Yaglom, Challenging Mathematical Problems with Elementary Solutions, vol.1, 1987, p.11 and p.83-88.

Crossrefs

Programs

  • Mathematica
    Table[If[n==1,1,((2*Floor[n/4])!)^2/128*(n^5+3*n^4+n^3+35*n^2+38*n+2-(n^5-n^4-7*n^3-n^2-10*n-30)*(-1)^n-4*(n^3+2*n^2+n-4)*n*Cos[Pi*n/2]-2*(n^5+n^4-11*n^3-7*n^2-2*n+2)*Sin[Pi*n/2])],{n,1,25}]
  • PARI
    a(n)={if(n==1, 1, (n\4*2)!^2*if(n%4<2, if(n%2==0, (n+1)^2, (n^3 + 3*n^2 + 2*n - 2)/2), if(n%2==0, (n^2+n+2)^2/4, (n+1)*(n-1)*(n^3 + n^2 - 6*n + 6)/8))/4)} \\ Andrew Howroyd, Sep 09 2019

Formula

a(n) = (((2*floor(n/4))!)^2/128)*(n^5 + 3*n^4 + n^3 + 35*n^2 + 38*n + 2 - (n^5 - n^4 - 7*n^3 - n^2 - 10*n - 30)*(-1)^n -4*(n^3 + 2*n^2 + n - 4)*n*cos(Pi*n/2) - 2*(n^5 + n^4 - 11*n^3 - 7*n^2 - 2*n + 2)*sin(Pi*n/2)), for n > 1.
a(n) = A323500(n) * A323501(n) for n > 1. - Andrew Howroyd, Sep 08 2019

A123072 Bishops on an 8n+1 X 8n+1 board (see Robinson paper for details).

Original entry on oeis.org

1, 2, 72, 7200, 1411200, 457228800, 221298739200, 149597947699200, 134638152929280000, 155641704786247680000, 224746621711341649920000, 396453040698806670458880000, 838894634118674914690990080000, 2097236585296687286727475200000000, 6115541882725140128097317683200000000
Offset: 0

Views

Author

N. J. A. Sloane, Sep 28 2006

Keywords

Crossrefs

Programs

  • Maple
    For Maple program see A005635.
  • Mathematica
    Table[(((2 n)!/n!)^2)/2, {n, 1, 20}] (* Benedict W. J. Irwin, Jun 05 2016 *)
    Table[SeriesCoefficient[Series[1/2 + EllipticK[16 x]/Pi, {x, 0, 20}],n] n! n!, {n, 1, 20}] (* Benedict W. J. Irwin, Jun 05 2016 *)

Formula

From_Reinhard Zumkeller_, Feb 16 2010: (Start)
a(n) = ceiling((((2*n)! / n!)^2) / 2).
a(n) = A001700(n-1) * A010050(n). (End)
From Benedict W. J. Irwin, Jun 05 2016: (Start)
G.f. for a(n)/(n!)^2 : 1/2 + EllipticK(16*x)/Pi, which is the E.g.f for A187535.
G.f. for a(n)/(n!)^3 : 2F2(1/2, 1/2; 1, 1; 16z)/2.
a(n) = n!*A187535(n) = binomial(2*n-1, n-1)*(2*n)!.
(End)
a(n) = A156992(2n,n). - Alois P. Heinz, Apr 30 2017
a(n) ~ asy(2*n-1) where asy(n) = (2*n/e)^n*(18*n + 6 + 1/n)/9. - Peter Luschny, Dec 05 2019
Sum_{n>=0} 1/a(n) = 1 + StruveL(0, 1/2)*Pi/4, where StruveL is the modified Struve function. - Amiram Eldar, Dec 04 2022

Extensions

a(0)=1 prepended by Alois P. Heinz, Apr 30 2017

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