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

A047659 Number of ways to place 3 nonattacking queens on an n X n board.

Original entry on oeis.org

0, 0, 0, 0, 24, 204, 1024, 3628, 10320, 25096, 54400, 107880, 199400, 348020, 579264, 926324, 1431584, 2148048, 3141120, 4490256, 6291000, 8656860, 11721600, 15641340, 20597104, 26797144, 34479744, 43915768, 55411720, 69312516, 86004800, 105919940
Offset: 0

Views

Author

Keywords

Comments

Lucas mentions that the number of ways of placing p <= n non-attacking queens on an n X n chessboard is given by a polynomial in n of degree 2p and attribute the result to Mantel, professor in Delft. Cf. Stanley, exercise 15.

References

  • E. Landau, Naturwissenschaftliche Wochenschrift (Aug. 2 1896).
  • R. P. Stanley, Enumerative Combinatorics, vol. I, exercise 15 in chapter 4 (and its solution) asks one to show the existence of a rational generating function for the number of ways of placing k non-attacking queens on an n X n chessboard.

Crossrefs

Column k=3 of A348129.

Programs

  • Magma
    [(3*(2*n-1)*(-1)^n +4*n^6 -40*n^5 +158*n^4 -300*n^3 +264*n^2 -86*n +3)/24: n in [0..35]]; // Vincenzo Librandi, Sep 21 2015
    
  • Maple
    f:=n-> n^6/6 - 5*n^5/3 + 79*n^4/12 - 25*n^3/2 + 11*n^2 - 43*n/12 + 1/8 + (-1)^n*(n/4 - 1/8); [seq(f(n),n=1..40)]; # N. J. A. Sloane, Feb 16 2013
  • Mathematica
    Table[If[EvenQ[n],n (n-2)^2 (2n^3-12n^2+23n-10)/12,(n-1)(n-3) (2n^4- 12n^3+25n^2-14n+1)/12],{n,0,30}] (* or *) LinearRecurrence[ {5,-8,0,14,-14,0,8,-5,1},{0,0,0,0,24,204,1024,3628,10320},30] (* Harvey P. Dale, Nov 06 2011 *)
  • PARI
    a(n)=if(n%2, (n - 1)*(n - 3)*(2*n^4 - 12*n^3 + 25*n^2 - 14*n + 1), n*(n - 2)^2*(2*n^3 - 12*n^2 + 23*n - 10))/12 \\ Charles R Greathouse IV, Feb 09 2017

Formula

a(n) = n(n - 2)^2(2n^3 - 12n^2 + 23n - 10)/12 if n is even and (n - 1)(n - 3)(2n^4 - 12n^3 + 25n^2 - 14n + 1)/12 if n is odd (Landau, 1896).
a(n) = 5a(n - 1) - 8a(n - 2) + 14a(n - 4) - 14a(n - 5) + 8a(n - 7) - 5a(n - 8) + a(n - 9) for n >= 9.
G.f.: 4(9*x^4 + 35*x^3 + 49*x^2 + 21*x + 6)*x^4/((1 - x)^7*(1 + x)^2).
a(0)=0, a(1)=0, a(2)=0, a(3)=0, a(4)=24, a(5)=204, a(6)=1024, a(7)=3628, a(8)=10320, a(n) = 5*a(n-1)-8*a(n-2)+14*a(n-4)-14*a(n-5)+8*a(n-7)- 5*a(n-8)+ a(n-9). - Harvey P. Dale, Nov 06 2011
a(n) = n^6/6 - 5*n^5/3 + 79*n^4/12 - 25*n^3/2 + 11*n^2 - 43*n/12 + 1/8 + (-1)^n*(n/4 - 1/8) [Chaiken et al.]. - N. J. A. Sloane, Feb 16 2013
a(n) = (3*(2*n-1)*(-1)^n +4*n^6 -40*n^5 +158*n^4 -300*n^3 +264*n^2 -86*n +3)/24. - Antal Pinter, Oct 03 2014
E.g.f.: (exp(2*x)*(3 - 6*x^2 + 8*x^3 + 18*x^4 + 20*x^5 + 4*x^6) -3 - 6*x) / (24*exp(x)). - Vaclav Kotesovec, Feb 15 2015
For n>3, a(n) = A179058(n) -4*(n-2)*A000914(n-2) -2*(n-2)*A002415(n-1) + 2*A008911(n-1) +8*(A001752(n-4) +A007009(n-3)). - Antal Pinter, Sep 20 2015
In general, for m <= n, n >= 3, the number of ways to place 3 nonattacking queens on an m X n board is n^3/6*(m^3 - 3*m^2 + 2*m) - n^2/2*(3*m^3 - 9*m^2 + 6*m) + n/6*(2*m^4 + 20*m^3 - 77*m^2 + 58*m) - 1/24*(39*m^4 - 82*m^3 - 36*m^2 + 88*m) + 1/16*(2*m - 4*n + 1)*(1 + (-1)^(m+1)) + 1/2*(1 + abs(n - 2*m + 3) - abs(n - 2*m + 4))*(1/24*((n - 2*m + 11)^4 - 42*(n - 2*m + 11)^3 + 656*(n - 2*m + 11)^2 - 4518*(n - 2*m + 11) + 11583) - 1/16*(4*m - 2*n - 1)*(1 + (-1)^(n+1))) [Panos Louridas, idee & form 93/2007, pp. 2936-2938]. - Vaclav Kotesovec, Feb 20 2016

Extensions

The formula given in the Rivin et al. paper is wrong.
Entry improved by comments from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), May 30 2001

A144084 T(n,k) is the number of partial bijections of height k (height(alpha) = |Im(alpha)|) of an n-element set.

Original entry on oeis.org

1, 1, 1, 1, 4, 2, 1, 9, 18, 6, 1, 16, 72, 96, 24, 1, 25, 200, 600, 600, 120, 1, 36, 450, 2400, 5400, 4320, 720, 1, 49, 882, 7350, 29400, 52920, 35280, 5040, 1, 64, 1568, 18816, 117600, 376320, 564480, 322560, 40320
Offset: 0

Views

Author

Abdullahi Umar, Sep 10 2008, Sep 30 2008

Keywords

Comments

T(n,k) is also the number of elements in the Green's J equivalence classes in the symmetric inverse monoid, I sub n.
T(n,k) is also the number of ways to place k nonattacking rooks on an n X n chessboard. It can be obtained by performing P(n,k) permutations of n-columns over each C(n,k) combination of n-rows for the given k-rooks. The rule is also applicable for unequal (m X n) sized rectangular boards. - Antal Pinter, Nov 12 2014
Rows also give the coefficients of the matching-generating polynomial of the complete bipartite graph K_{n,n}. - Eric W. Weisstein, Apr 24 2017
Rows also give the coefficients of the independence polynomial of the n X n rook graph and clique polynomial of the n X n rook complement graph. - Eric W. Weisstein, Jun 13 and Sep 14 2017
T(n,k) is the number of increasing subsequences of length n-k over all permutations of [n]. - Geoffrey Critzer, Jan 08 2023

Examples

			T(3,1) = 9 because there are exactly 9 partial bijections (on a 3-element set) of height 1, namely: (1)->(1), (1)->(2), (1)->(3), (2)->(1), (2)->(2), (2)->(3), (3)->(1), (3)->(2), (3)->(3).
Triangle T(n,k) begins:
  1;
  1,  1;
  1,  4,   2;
  1,  9,  18,    6;
  1, 16,  72,   96,   24;
  1, 25, 200,  600,  600,  120;
  1, 36, 450, 2400, 5400, 4320, 720;
  ...
		

References

  • O. Ganyushkin and V. Mazorchuk, Classical Finite Transformation Semigroups, 2009, page 61.
  • J. M. Howie, Fundamentals of semigroup theory. Oxford: Clarendon Press, (1995).
  • Vaclav Kotesovec, Non-attacking chess pieces, 6th ed. (2013), p. 216, p. 218.

Crossrefs

T(n,k) = |A021010|. Sum of rows of T(n,k) is A002720. T(n,n) is the order of the symmetric group on an n-element set, n!.

Programs

  • Magma
    /* As triangle */ [[(Binomial(n,k)^2)*Factorial(k): k in [0..n]]: n in [0.. 10]]; // Vincenzo Librandi, Jun 13 2017
    
  • Maple
    T:= (n, k)-> (binomial(n, k)^2)*k!:
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Dec 04 2012
  • Mathematica
    Table[Table[Binomial[n, k]^2 k!,{k, 0, n}], {n, 0, 6}] // Flatten (* Geoffrey Critzer, Dec 04 2012 *)
    Table[ CoefficientList[n!*LaguerreL[n, x], x] // Abs // Reverse, {n, 0, 8}] // Flatten (* Jean-François Alcover, Nov 18 2013 *)
    CoefficientList[Table[n! x^n LaguerreL[n, -1/x], {n, 0, 8}], x] // Flatten (* Eric W. Weisstein, Apr 24 2017 *)
    CoefficientList[Table[(-x)^n HypergeometricU[-n, 1, -(1/x)], {n, 5}],
      x] // Flatten (* Eric W. Weisstein, Jun 13 2017 *)
  • PARI
    T(n,k) = k! * binomial(n,k)^2 \\ Andrew Howroyd, Feb 13 2018

Formula

T(n,k) = (C(n,k)^2)*k!.
T(n,k) = A007318(n,k) * A008279(n,k). - Antal Pinter, Nov 12 2014
From Peter Bala, Jul 04 2016: (Start)
G.f.: exp(x*t)*I_0(2*sqrt(x)) = 1 + (1 + t)*x/1!^2 + (1 + 4*t + 2*t^2)*x^2/2!^2 + (1 + 9*t + 18*t^2 + 6*t^3)*x^3/3!^2 + ..., where I_0(x) = Sum_{n >= 0} (x/2)^(2*n)/n!^2 is a modified Bessel function of the first kind.
The row polynomials R(n,t) satisfy R(n,t + u) = Sum_{k = 0..n} T(n,k)*t^k*R(n-k,u).
R(n,t) = 1 + Sum_{k = 0..n-1} (-1)^(n-k+1)*n!/k!*binomial(n,k) *t^(n-k)*R(k,t). Cf. A089231. (End)
From Peter Bala, Oct 05 2019: (Start)
E.g.f.: 1/(1 - t*x)*exp(x/(1 - t*x)).
Recurrence for row polynomials: R(n+1,t) = (1 + (2*n+1)*t)R(n,t) - n^2*t^2*R(n-1,t), with R(0,t) = 1 and R(1,t) = 1 + t.
R(n,t) equals the denominator polynomial of the finite continued fraction 1 + n*t/(1 + n*t/(1 + (n-1)*t/(1 + (n-1)*t/(1 + ... + 2*t/(1 + 2*t/(1 + t/(1 + t/(1)))))))). The numerator polynomial is the (n+1)-th row polynomial of A089231. (End)
Sum_{n>=0} Sum_{k=0..n} T(n,k)*y^k*x^n/A001044(n) = exp(y*x)*E(x) where E(x) = Sum_{n>=0} x^n/A001044(n). - Geoffrey Critzer, Jan 08 2023
Sum_{k=0..n} k*T(n,k) = A105219(n). - Alois P. Heinz, Jan 08 2023
T(n,k) = Sum_{d=0..2*k} c(k,d)*n^d, where c(k,d) = Sum_{j=max(d-k,0)..k} binomial(k,j)*A008275(k+j,d)/j!. - Eder G. Santos, Jan 23 2025

A179059 Number of non-attacking placements of 4 rooks on an n X n board.

Original entry on oeis.org

0, 0, 0, 24, 600, 5400, 29400, 117600, 381024, 1058400, 2613600, 5880600, 12269400, 24048024, 44717400, 79497600, 135945600, 224726400, 360561024, 563376600, 859685400, 1284221400, 1881864600, 2709885024, 3840540000, 5364060000
Offset: 1

Views

Author

Thomas Zaslavsky, Jun 27 2010

Keywords

Crossrefs

Column k=4 of A144084.
Cf. A179058 (3 rooks), A179060 (5 rooks).

Programs

  • Mathematica
    LinearRecurrence[{9,-36,84,-126,126,-84,36,-9,1},{0,0,0,24,600,5400,29400,117600,381024},40] (* Harvey P. Dale, Feb 19 2013 *)
    a[n_] := If[n<4, 0, Coefficient[n!*LaguerreL[n, x], x, n-4] // Abs];
    Array[a, 30] (* Jean-François Alcover, Jun 14 2018, after A144084 *)
  • PARI
    a(n) = 4! * binomial(n, 4)^2; \\ Andrew Howroyd, Feb 13 2018

Formula

a(n) = 4! * binomial(n, 4)^2.
From Colin Barker, Jan 08 2013: (Start)
a(n) = (n^2*(-6+11*n-6*n^2+n^3)^2)/24.
G.f.: -24*x^4*(x^4 +16*x^3 +36*x^2 +16*x +1) / (x -1)^9.
(End)
From Amiram Eldar, Nov 02 2021: (Start)
Sum_{n>=4} 1/a(n) = (20*Pi^2 - 197)/9.
Sum_{n>=4} (-1)^n/a(n) = (64*log(2) - 44)/9. (End)

A303212 Number of minimum total dominating sets in the n X n rook complement graph.

Original entry on oeis.org

0, 1, 6, 96, 600, 2400, 7350, 18816, 42336, 86400, 163350, 290400, 490776, 794976, 1242150, 1881600, 2774400, 3995136, 5633766, 7797600, 10613400, 14229600, 18818646, 24579456, 31740000, 40560000, 51333750, 64393056, 80110296, 98901600
Offset: 1

Views

Author

Eric W. Weisstein, Apr 19 2018

Keywords

Comments

For n > 2, the minimum total dominating sets are any three vertices such that no two are in the same row or column. - Andrew Howroyd, Apr 20 2018
Essentially the same as A179058(n), differing only for n=2. - Eric W. Weisstein, Dec 06 2023

Crossrefs

Programs

  • Mathematica
    Table[If[n == 2, 1, 6 Binomial[n, 3]^2], {n, 20}]
    Join[{0, 1}, LinearRecurrence[{7, -21, 35, -35, 21, -7, 1}, {0, 0, 6, 96, 600, 2400, 7350}, {3, 20}]]
    CoefficientList[Series[x (-1 + x - 75 x^2 - 19 x^3 - 41 x^4 + 21 x^5 - 7 x^6 + x^7)/(-1 + x)^7, {x, 0, 20}], x]
  • PARI
    a(n) = if(n<3, n==2, 6*binomial(n,3)^2) \\ Andrew Howroyd, Apr 20 2018
    
  • PARI
    concat(0, Vec(x^2*(1 - x + 75*x^2 + 19*x^3 + 41*x^4 - 21*x^5 + 7*x^6 - x^7) / (1 - x)^7 + O(x^60))) \\ Colin Barker, Apr 20 2018

Formula

a(n) = A179058(n) for n > 2. - Andrew Howroyd, Apr 20 2018
From Colin Barker, Apr 20 2018: (Start)
G.f.: x^2*(1 - x + 75*x^2 + 19*x^3 + 41*x^4 - 21*x^5 + 7*x^6 - x^7) / (1 - x)^7.
a(n) = n^2*(2 - 3*n + n^2)^2 / 6 for n > 2.
a(n) = 7*a(n-1) - 21*a(n-2) + 35*a(n-3) - 35*a(n-4) + 21*a(n-5) - 7*a(n-6) + a(n-7) for n > 9.
(End)

Extensions

a(6)-a(30) from Andrew Howroyd, Apr 20 2018

A291910 Number of 4-cycles in the n X n rook complement graph.

Original entry on oeis.org

0, 0, 9, 576, 6900, 44100, 196245, 686784, 2023056, 5232600, 12224025, 26310240, 52936884, 100663836, 182452725, 317318400, 532407360, 865571184, 1368508041, 2110550400, 3183182100, 4705372980, 6829824309, 9750223296, 13709610000, 19009965000, 26023131225
Offset: 1

Views

Author

Eric W. Weisstein, Sep 05 2017

Keywords

Crossrefs

Cf. A179058 (3-cycles), A291911 (5-cycles), A291912 (6-cycles).

Programs

  • Mathematica
    Table[(-2 + n) (-1 + n)^2 n^2 (-4 + 5 n - 4 n^2 + n^3)/8, {n, 20}]
    LinearRecurrence[{9, -36, 84, -126, 126, -84, 36, -9, 1}, {0, 0, 9, 576, 6900, 44100, 196245, 686784, 2023056}, 30]
    CoefficientList[Series[-((3 x^2 (3 + 165 x + 680 x^2 + 660 x^3 + 165 x^4 + 7 x^5))/(-1 + x)^9), {x, 0, 20}], x]

Formula

a(n) = (n-2)*(n-1)^2*n^2*(-4 + 5*n - 4*n^2 + n^3)/8.
a(n) = 9*a(n-1) - 36*a(n-2) + 84*a(n-3) - 126*a(n-4) + 126*a(n-5) - 84*a(n-6) + 36*a(n-7) - 9*a(n-8) + a(n-9).
G.f.: -((3 x^3 (3 + 165 x + 680 x^2 + 660 x^3 + 165 x^4 + 7 x^5))/(-1 + x)^9).

A291911 Number of 5-cycles in the n X n rook complement graph.

Original entry on oeis.org

0, 0, 36, 3456, 77040, 800640, 5265540, 25514496, 99320256, 327836160, 951285060, 2488844160, 5980596336, 13384215936, 28197301860, 56398325760, 107825391360, 198142765056, 351580800996, 604675808640, 1011282960240, 1649187872640, 2628701385156
Offset: 1

Views

Author

Eric W. Weisstein, Sep 05 2017

Keywords

Crossrefs

Cf. A179058 (3-cycles), A291910 (4-cycles), A291912 (6-cycles).

Programs

  • Mathematica
    Table[(n - 2)^2 (n - 1)^2 n^2 (4 + 2 n + 3 n^2 - 4 n^3 + n^4)/10, {n, 20}]
    LinearRecurrence[{11, -55, 165, -330, 462, -462, 330, -165, 55, -11, 1}, {0, 0, 36, 3456, 77040, 800640, 5265540, 25514496, 99320256, 327836160, 951285060}, 20]
    CoefficientList[Series[-((36 x^2 (1 + 85 x + 1139 x^2 + 3815 x^3 + 3815 x^4 + 1139 x^5 + 85 x^6 + x^7))/(-1 + x)^11), {x, 0, 20}], x]

Formula

a(n) = (n - 2)^2*(n - 1)^2*n^2*(4 + 2*n + 3*n^2 - 4*n^3 + n^4)/10.
a(n) = 11*a(n-1) - 55*a(n-2) + 165*(n-3) - 330*a(n-4) + 462*a(n-5) - 462*a(n-6) + 330*a(n-7) - 165*a(n-8) + 55*a(n-9) - 11*a(n-10) + a(n-11).
G.f.: -((36 x^3 (1 + 85 x + 1139 x^2 + 3815 x^3 + 3815 x^4 + 1139 x^5 + 85 x^6 + x^7))/(-1 + x)^11).

A291912 Number of 6-cycles in the n X n rook complement graph.

Original entry on oeis.org

0, 0, 60, 18336, 840800, 14629200, 143939460, 971877760, 5018582016, 21193207200, 76518984300, 243664127520, 699965254560, 1844973808496, 4520720267700, 10403885452800, 22674321863680, 47112768624960, 93845538165276, 180039346960800, 333959821087200, 600947653207440
Offset: 1

Views

Author

Eric W. Weisstein, Sep 05 2017

Keywords

Crossrefs

Cf. A179058 (3-cycles), A291910 (4-cycles), A291911 (5-cycles).

Programs

  • Mathematica
    Table[(-2 + n) (-1 + n)^2 n^2 (-52 + 12 n + 76 n^2 - 63 n^3 - 2 n^4 + 20 n^5 - 8 n^6 + n^7)/12, {n, 20}]
    LinearRecurrence[{13, -78, 286, -715, 1287, -1716, 1716, -1287, 715, -286, 78, -13, 1}, {0, 0, 60, 18336, 840800, 14629200, 143939460, 971877760, 5018582016, 21193207200, 76518984300, 243664127520, 699965254560}, 20]
    CoefficientList[Series[(4 x^2 (-15 - 4389 x - 151778 x^2 - 1277962 x^3 - 3535266 x^4 - 3576650 x^5 - 1293586 x^6 - 137682 x^7 - 1883 x^8 + 11 x^9))/(-1 + x)^13, {x, 0, 20}], x]

Formula

a(n) = (-2 + n)*(-1 + n)^2*n^2*(-52 + 12*n + 76*n^2 - 63*n^3 - 2*n^4 + 20*n^5 - 8*n^6 + n^7)/12.
a(n) = 13*a(n-1) - 78*a(n-2) + 286*a(n-3) - 715*a(n-4) + 1287*a(n-5) - 1716*a(n-6) + 1716*a(n-7) - 1287*a(n-8) + 715*a(n-9) - 286*a(n-10) + 78*a(n-11) - 13*a(n-12) + a(n-13).
G.f.: (4 x^3 (-15 - 4389 x - 151778 x^2 - 1277962 x^3 - 3535266 x^4 - 3576650 x^5 - 1293586 x^6 - 137682 x^7 - 1883 x^8 + 11 x^9))/(-1 + x)^13.

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

Original entry on oeis.org

0, 1, 4, 13, 31, 66, 123, 214, 346, 535, 790, 1131, 1569, 2128, 2821, 3676, 4708, 5949, 7416, 9145, 11155, 13486, 16159, 19218, 22686, 26611, 31018, 35959, 41461, 47580, 54345, 61816, 70024, 79033, 88876, 99621, 111303, 123994, 137731, 152590, 168610, 185871
Offset: 1

Views

Author

Mo Li, Apr 19 2019

Keywords

Examples

			For n = 4 the a(4) = 13 solutions are
{{1,0,0,0}}  {{1,0,0,0}}  {{1,0,0,0}}
{{0,1,0,0}}  {{0,0,1,0}}  {{0,0,0,1}}
{{0,0,0,0}}  {{0,0,0,0}}  {{0,0,0,0}}
{{0,0,0,0}}  {{0,0,0,0}}  {{0,0,0,0}}
—————————————————————————————————————
{{1,0,0,0}}  {{1,0,0,0}}  {{1,0,0,0}}
{{0,0,0,0}}  {{0,0,0,0}}  {{0,0,0,0}}
{{0,0,1,0}}  {{0,0,0,1}}  {{0,0,0,0}}
{{0,0,0,0}}  {{0,0,0,0}}  {{0,0,0,1}}
—————————————————————————————————————
{{0,1,0,0}}  {{0,1,0,0}}  {{0,1,0,0}}
{{1,0,0,0}}  {{0,0,1,0}}  {{0,0,0,1}}
{{0,0,0,0}}  {{0,0,0,0}}  {{0,0,0,0}}
{{0,0,0,0}}  {{0,0,0,0}}  {{0,0,0,0}}
—————————————————————————————————————
{{0,1,0,0}}  {{0,1,0,0}}  {{0,1,0,0}}
{{0,0,0,0}}  {{0,0,0,0}}  {{0,0,0,0}}
{{0,0,1,0}}  {{0,0,0,1}}  {{0,0,0,0}}
{{0,0,0,0}}  {{0,0,0,0}}  {{0,0,1,0}}
—————————————————————————————————————
{{0,0,0,0}}
{{0,1,0,0}}
{{0,0,1,0}}
{{0,0,0,0}}
		

Crossrefs

Programs

  • Mathematica
    Table[
    Piecewise[{{(n (n^3 - 2 n^2 + 6 n - 4))/16, Mod[n, 2] == 0},
    {((n - 1) (n^3 - n^2 + 5 n - 1))/16, Mod[n, 2] == 1}}],{n, 20}]

Formula

a(n) = (1/16)*n*(n^3-2n^2+6n-4) if n is even;
a(n) = (1/16)*(n-1)*(n^3-n^2+5n-1) if n is odd.
G.f.: -x^2*(x^2+1)*(x^2+x+1)/((x+1)^2*(x-1)^5). - Alois P. Heinz, Apr 26 2019
Showing 1-8 of 8 results.