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-10 of 11 results. Next

A000170 Number of ways of placing n nonattacking queens on an n X n board.

Original entry on oeis.org

1, 1, 0, 0, 2, 10, 4, 40, 92, 352, 724, 2680, 14200, 73712, 365596, 2279184, 14772512, 95815104, 666090624, 4968057848, 39029188884, 314666222712, 2691008701644, 24233937684440, 227514171973736, 2207893435808352, 22317699616364044, 234907967154122528
Offset: 0

Views

Author

Keywords

Comments

For n > 3, a(n) is the number of maximum independent vertex sets in the n X n queen graph. - Eric W. Weisstein, Jun 20 2017
Number of nodes on level n of the backtrack tree for the n queens problem (a(n) = A319284(n, n)). - Peter Luschny, Sep 18 2018
Number of permutations of [1...n] such that |p(j)-p(i)| != j-i for iXiangyu Chen, Dec 24 2020
M. Simkin shows that the number of ways to place n mutually nonattacking queens on an n X n chessboard is ((1 +/- o(1))*n*exp(-c))^n, where c = 1.942 +/- 0.003. These are approximately (0.143*n)^n configurations. - Peter Luschny, Oct 07 2021

Examples

			a(2) = a(3) = 0, since on 2 X 2 and 3 X 3 chessboards there are no solutions.
.
a(4) = 2:
  +---------+ +---------+
  | . . Q . | | . Q . . |
  | Q . . . | | . . . Q |
  | . . . Q | | Q . . . |
  | . Q . . | | . . Q . |
  +---------+ +---------+
a(5) = 10:
  +-----------+ +-----------+ +-----------+ +-----------+ +-----------+
  | . . . Q . | | . . Q . . | | . . . . Q | | . . . Q . | | . . . . Q |
  | . Q . . . | | . . . . Q | | . . Q . . | | Q . . . . | | . Q . . . |
  | . . . . Q | | . Q . . . | | Q . . . . | | . . Q . . | | . . . Q . |
  | . . Q . . | | . . . Q . | | . . . Q . | | . . . . Q | | Q . . . . |
  | Q . . . . | | Q . . . . | | . Q . . . | | . Q . . . | | . . Q . . |
  +-----------+ +-----------+ +-----------+ +-----------+ +-----------+
  +-----------+ +-----------+ +-----------+ +-----------+ +-----------+
  | Q . . . . | | . Q . . . | | Q . . . . | | . . Q . . | | . Q . . . |
  | . . . Q . | | . . . . Q | | . . Q . . | | Q . . . . | | . . . Q . |
  | . Q . . . | | . . Q . . | | . . . . Q | | . . . Q . | | Q . . . . |
  | . . . . Q | | Q . . . . | | . Q . . . | | . Q . . . | | . . Q . . |
  | . . Q . . | | . . . Q . | | . . . Q . | | . . . . Q | | . . . . Q |
  +-----------+ +-----------+ +-----------+ +-----------+ +-----------+
a(6) = 4:
  +-------------+ +-------------+ +-------------+ +-------------+
  | . . . . Q . | | . . . Q . . | | . . Q . . . | | . Q . . . . |
  | . . Q . . . | | Q . . . . . | | . . . . . Q | | . . . Q . . |
  | Q . . . . . | | . . . . Q . | | . Q . . . . | | . . . . . Q |
  | . . . . . Q | | . Q . . . . | | . . . . Q . | | Q . . . . . |
  | . . . Q . . | | . . . . . Q | | Q . . . . . | | . . Q . . . |
  | . Q . . . . | | . . Q . . . | | . . . Q . . | | . . . . Q . |
  +-------------+ +-------------+ +-------------+ +-------------+
- _Hugo Pfoertner_, Mar 17 2019
		

References

  • M. Gardner, The Unexpected Hanging, pp. 190-2, Simon & Shuster NY 1969
  • Jieh Hsiang, Yuh-Pyng Shieh and Yao-Chiang Chen, The cyclic complete mappings counting problems, in Problems and Problem Sets for ATP, volume 02-10 of DIKU technical reports, G. Sutcliffe, J. Pelletier and C. Suttner, eds., 2002.
  • D. E. Knuth, The Art of Computer Programming, Volume 4, Pre-fascicle 5B, Introduction to Backtracking, 7.2.2. Backtrack programming. 2018.
  • M. Kraitchik, The Problem of The Queens, Mathematical Recreations, 2nd ed., New York, Dover, 1953, pp. 247-256.
  • Massimo Nocentini, "An algebraic and combinatorial study of some infinite sequences of numbers supported by symbolic and logic computation", PhD Thesis, University of Florence, 2019. See Ex. 67.
  • W. W. Rouse Ball and H. S. M. Coxeter, Mathematical Recreations and Essays, 13th ed., New York, Dover, 1987, pp. 166-172 (The Eight Queens Problem).
  • M. A. Sainte-Laguë, Les Réseaux (ou Graphes), Mémorial des Sciences Mathématiques, Fasc. 18, Gauthier-Villars, Paris, 1926, p. 47.
  • 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).
  • R. J. Walker, An enumerative technique for a class of combinatorial problems, pp. 91-94 of Proc. Sympos. Applied Math., vol. 10, Amer. Math. Soc., 1960.
  • M. B. Wells, Elements of Combinatorial Computing. Pergamon, Oxford, 1971, p. 238.

Crossrefs

Cf. A036464 (2Q), A047659 (3Q), A061994 (4Q), A108792 (5Q), A176186 (6Q).
Cf. A099152, A006717, A051906, A319284 (backtrack trees).
Main diagonal of A348129.

Formula

Strong conjecture: there is a constant c around 2.54 such that a(n) is asymptotic to n!/c^n; weak conjecture: lim_{n -> infinity} (1/n) * log(n!/a(n)) = constant = 0.90.... - Benoit Cloitre, Nov 10 2002
Lim_{n->infinity} a(n)^(1/n)/n = exp(-A359441) = 0.1431301... [Simkin 2021]. - Vaclav Kotesovec, Jan 01 2023
a(n) = 8 * A260320(n) + 4 * A260319(n) + 2 * A260318(n) for n >= 2 (see Kraitchik reference). - Jason Bard, Aug 12 2025

Extensions

Terms for n=21-23 computed by Sylvain PION (Sylvain.Pion(AT)sophia.inria.fr) and Joel-Yann FOURRE (Joel-Yann.Fourre(AT)ens.fr).
a(24) from Kenji KISE (kis(AT)is.uec.ac.jp), Sep 01 2004
a(25) from Objectweb ProActive INRIA Team (proactive(AT)objectweb.org), Jun 11 2005 [Communicated by Alexandre Di Costanzo (Alexandre.Di_Costanzo(AT)sophia.inria.fr)]. This calculation took about 53 years of CPU time.
a(25) has been confirmed by the NTU 25Queen Project at National Taiwan University and Ming Chuan University, led by Yuh-Pyng (Arping) Shieh, Jul 26 2005. This computation took 26613 days CPU time.
The NQueens-at-Home web site gives a different value for a(24), 226732487925864. Thanks to Goran Fagerstrom for pointing this out. I do not know which value is correct. I have therefore created a new entry, A140393, which gives the NQueens-at-home version of the sequence. - N. J. A. Sloane, Jun 18 2008
It now appears that this sequence (A000170) is correct and A140393 is wrong. - N. J. A. Sloane, Nov 08 2008
Added a(26) as calculated by Queens(AT)TUD [http://queens.inf.tu-dresden.de/]. - Thomas B. Preußer, Jul 11 2009
Added a(27) as calculated by the Q27 Project [https://github.com/preusser/q27]. - Thomas B. Preußer, Sep 23 2016
a(0) = 1 prepended by Joerg Arndt, Sep 16 2018

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

A036464 Number of ways to place two nonattacking queens on an n X n board.

Original entry on oeis.org

0, 0, 8, 44, 140, 340, 700, 1288, 2184, 3480, 5280, 7700, 10868, 14924, 20020, 26320, 34000, 43248, 54264, 67260, 82460, 100100, 120428, 143704, 170200, 200200, 234000, 271908, 314244, 361340, 413540, 471200, 534688, 604384
Offset: 1

Views

Author

Robert G. Wilson v, Raymond Bush (c17h21no4(AT)hotmail.com), Kirk Conely, N. J. A. Sloane

Keywords

Crossrefs

Column k=2 of A348129.

Programs

  • Maple
    f:=n->n^4/2 - 5*n^3/3 + 3*n^2/2 - n/3; [seq(f(n),n=1..200)]; # N. J. A. Sloane, Feb 16 2013
  • Mathematica
    f[k_] := 2 k; t[n_] := Table[f[k], {k, 1, n}]
    a[n_] := SymmetricPolynomial[2, t[n]]
    Table[a[n], {n, 2, 50}]   (* A036464 *)
    Table[a[n]/4, {n, 2, 50}] (* A000914 *)
    (* Clark Kimberling, Dec 31 2011 *)
    CoefficientList[Series[4 x^2 (2 + x) / (1-x)^5, {x, 0, 40}], x] (* Vincenzo Librandi, May 02 2013 *)
    LinearRecurrence[{5,-10,10,-5,1},{0,0,8,44,140},50] (* Harvey P. Dale, Mar 26 2015 *)

Formula

a(n) = C(n, 3)*(3*n-1).
G.f.: 4*x^3*(2+x)/(1-x)^5. - Colin Barker, May 02 2012
a(n) = 2*sum_{i=1..n-2} i(i + 1)^2. - Wesley Ivan Hurt, Mar 18 2014
E.g.f.: (exp(x) * x^3 * (8 + 3*x))/6. - Vaclav Kotesovec, Feb 15 2015
For n>0, a(n) = A163102(n-1) - A006331(n-1). - Antal Pinter, Sep 20 2015

A061994 Number of ways to place 4 nonattacking queens on an n X n board.

Original entry on oeis.org

0, 0, 0, 0, 2, 82, 982, 7002, 34568, 131248, 412596, 1123832, 2739386, 6106214, 12654614, 24675650, 45704724, 80999104, 138170148, 227938788, 365106738, 569681574, 868289594, 1295775946, 1897176508, 2729909796
Offset: 0

Views

Author

Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), May 31 2001

Keywords

Comments

An analytical solution for the 4-queens problem permits us to combine six particular cases into a single "unified" expression: a(n) = n(n-1)(45n^6 - 855n^5 + 6945n^4 - 30891n^3 + 78864n^2 - 106226n + 53404)/1080 + (n^3 - 21/2n^2 + 28n - 14)*floor(n/2) + 32/9(n-1)*floor(n/3) + (16/9n-4)*floor((n+1)/3). The method used to derive this formula helps to fine-tune an estimate by E. Lucas for a(n) (see comment to A047659 "3-queens problem"). For any fixed value of k > 1, a(n) = n^(2k)/k! - 5/3n^(2k-1)/(k-2)! + O(n^(2k-2)). - Sergey Perepechko, Sep 16 2005

References

  • Vaclav Kotesovec, Between chessboard and computer, 1996, pp. 204-206.

Crossrefs

Column k=4 of A348129.

Programs

  • Mathematica
    CoefficientList[Series[x^4*(2 +76*x +734*x^2 +3992*x^3 +13318*x^4 +29356*x^5 +46304*x^6 +53580*x^7 +46890*x^8 +29768*x^9 +13522*x^10 +3804*x^11 +574*x^12)/((1-x)^3*(1-x^2)^4*(1-x^3)^2), {x, 0, 40}], x] (* Vincenzo Librandi, May 12 2013 *)
    LinearRecurrence[{3,1,-9,0,12,7,-15,-16,16,15,-7,-12,0,9,-1,-3,1}, {0,0,0,0,2,82, 982,7002,34568,131248,412596,1123832,2739386,6106214,12654614,24675650, 45704724}, 40] (* Harvey P. Dale, Jan 21 2017 *)
  • SageMath
    def p(x): return x^4*(2 +76*x +734*x^2 +3992*x^3 +13318*x^4 +29356*x^5 +46304*x^6 +53580*x^7 +46890*x^8 +29768*x^9 +13522*x^10 +3804*x^11 +574*x^12)/((1-x)^3*(1-x^2)^4*(1-x^3)^2)
    def A061994_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( p(x) ).list()
    A061994_list(40) # G. C. Greubel, Apr 30 2022

Formula

G.f.: x^4*(2 + 76*x + 734*x^2 + 3992*x^3 + 13318*x^4 + 29356*x^5 + + 46304*x^6 + + 53580*x^7 + 46890*x^8 + 29768*x^9 + 13522*x^10 + 3804*x^11 + 574*x^12)/((1-x)^3*(1-x^2)^4*(1-x^3)^2).
Recurrence: a(n) = 3*a(n-1) + a(n-2) - 9*a(n-3) + 12*a(n-5) + 7*a(n-6) - 15*a(n-7) - 16*a(n-8) + 16*a(n-9) + 15*a(n-10) - 7*a(n-11) - 12*a(n-12) + 9*a(n-14) - a(n-15) - 3*a(n-16) + a(n-17), n >= 17.
Explicit formula (V. Kotesovec, 1992) for n >= 2: a(n) = n^8/24 - 5*n^7/6 + 65*n^6/9 - 1051*n^5/30 + 817*n^4/8 added to one of the following terms:
- 4769*n^3/27 + 1963*n^2/12 - 1769*n/30 if n = 0 (mod 6)
- 9565*n^3/54 + 1013*n^2/6 - 6727*n/90 + 257/27 if n = 1 (mod 6)
- 4769*n^3/27 + 1963*n^2/12 - 5467*n/90 + 28/27 if n = 2 (mod 6)
- 9565*n^3/54 + 1013*n^2/6 - 2189*n/30 + 7 if n = 3 (mod 6)
- 4769*n^3/27 + 1963*n^2/12 - 5467*n/90 + 68/27 if n = 4 (mod 6)
- 9565*n^3/54 + 1013*n^2/6 - 6727*n/90 + 217/27 if n = 5 (mod 6).
a(n) = n^8/24 - 5n^7/6 + 65n^6/9 - 1051n^5/30 + 817n^4/8 - 19103n^3/108 + 3989n^2/24 - 18131n/270 + 253/54 + (n^3/4 - 21n^2/8 + 7n - 7/2)*(-1)^n + 32*(n - 1)/27*cos(2*Pi*n/3) + 40/81*sqrt(3)*sin(2*Pi*n/3). - Vaclav Kotesovec, Feb 11 2010
E.g.f.: (3*(exp(2*x)*(5060 - 4645*x + 1755*x^2 - 590*x^3 + 480*x^4 + 414*x^5 + 870*x^6 + 360*x^7 + 45*x^8) - 135*(28 + 37*x + 15*x^2 + 2*x^3)) - 1920 * exp(x/2) * (2+x) * cos(sqrt(3)*x/2) - 320 * sqrt(3) * exp(x/2) * (6*x-5) * sin(sqrt(3)*x/2)) / (3240 * exp(x)). - Vaclav Kotesovec, Feb 15 2015

Extensions

Minor edits by Vaclav Kotesovec, Feb 15 2015

A108792 Number of ways to place 5 nonattacking queens on an n X n board.

Original entry on oeis.org

10, 248, 4618, 46736, 310496, 1535440, 6110256, 20609544, 60963094, 162323448, 396155466, 899046952, 1917743448, 3879011584, 7491080844, 13892164232, 24854703014, 43071383040, 72532831794, 119038462248, 190849299076
Offset: 5

Views

Author

Sergey Perepechko, Jul 09 2005

Keywords

Crossrefs

Column k=5 of A348129.

Programs

  • Mathematica
    CoefficientList[Series[-(14206 x^31 + 150238*x^30 + 916976 x^29 + 3972232 x^28 + 13522008 x^27 + 37968860 x^26 + 90996604 x^25 + 190236360 x^24 + 352607230 x^23 + 586165718 x^22 + 881664746 x^21 + 1207443842 x^20 + 1512654886 x^19 + 1738866194 x^18 + 1837742548 x^17 + 1786911600 x^16 + 1598078300 x^15 + 1312598856 x^14 + 987611934 x^13 + 677994354 x^12 + 422347390 x^11 + 236939238 x^10 + 118533110 x^9 + 52176470 x^8 + 19855936 x^7 + 6376140 x^6 + 1672768 x^5 + 341612 x^4 + 50540 x^3 + 4836 x^2 + 258 x + 10) / ((x - 1)^11 (x + 1)^6 (x^2 + 1)^2 (x^2 + x + 1)^4 (x^4 + x^3 + x^2 + x + 1)^2), {x, 0, 35}], x] (* Vincenzo Librandi, May 16 2013 *)
    LinearRecurrence[{-1,3,7,3,-11,-21,-13,13,41,44,8,-49,-81,-57,15,88,106,48,-48,-106,-88,-15,57,81,49,-8,-44,-41,-13,13,21,11,-3,-7,-3,1,1},{10,248,4618,46736,310496,1535440,6110256,20609544,60963094,162323448,396155466,899046952,1917743448,3879011584,7491080844,13892164232,24854703014,43071383040,72532831794,119038462248,190849299076,299547508728,461105824676,697264240408,1037206552414,1519678218528,2195518394830,3130809484640,4410583469036,6143370199976,8466479411308,11552406363136,15616183774498,20924209082128,27804270360662,36657476189408,47971684617044},25] (* Harvey P. Dale, Mar 29 2025 *)

Formula

Explicit formula (Vaclav Kotesovec, Apr 04 2010): a(n) = 1/120*n^10 - 5/18*n^9 + 301/72*n^8 - 1679/45*n^7 + 78383/360*n^6 - 77519/90*n^5 + 1867681/810*n^4 - 6499681/1620*n^3 + 5324093/1296*n^2 - 12758453/6480*n + 13038851/64800 + (1/8*n^5 - 143/48*n^4 + 82/3*n^3 - 5647/48*n^2 + 10475/48*n - 3547/32)*(-1)^n + (29/2*n - 35/2)*cos(Pi*n/2) + (2*n+15)*sin(Pi*n/2) + (32/27*n^3 - 1328/81*n^2 + 6328/81*n - 5488/81)*cos(2*Pi*n/3) + (40*sqrt(3)/81*n^2 - 1496*sqrt(3)/243*n + 7024*sqrt(3)/243)*sin(2*Pi*n/3) + ((8*sqrt(5)/25 + 8/5)*n - 16*sqrt(5)/25 - 64/25)*cos(2*Pi*n/5) + 8*sqrt(22*sqrt(5)+50)/25*sin(2*Pi*n/5) + ((8/5-8*sqrt(5)/25)*n+16*sqrt(5)/25-64/25)*cos(Pi*n/5)*(-1)^n - 8*sqrt(50-22*sqrt(5))/25*sin(Pi*n/5)*(-1)^n. - Vaclav Kotesovec, Apr 04 2010
G.f.: -x^5*(14206*x^31+150238*x^30+916976*x^29+3972232*x^28+13522008*x^27+37968860*x^26+90996604*x^25+190236360*x^24+352607230*x^23+586165718*x^22+881664746*x^21+1207443842*x^20+1512654886*x^19+1738866194*x^18+1837742548*x^17+1786911600*x^16+1598078300*x^15+1312598856*x^14+987611934*x^13+677994354*x^12+422347390*x^11+236939238*x^10+118533110*x^9+52176470*x^8+19855936*x^7+6376140*x^6+1672768*x^5+341612*x^4+50540*x^3+4836*x^2+258*x+10)/((x-1)^11*(x+1)^6*(x^2+1)^2*(x^2+x+1)^4*(x^4+x^3+x^2+x+1)^2),
Recurrence: a(n)= - a(n-1) + 3*a(n-2) + 7*a(n-3) + 3*a(n-4) - 11*a(n-5) - 21*a(n-6) - 13*a(n-7) + 13*a(n-8) + 41*a(n-9) + 44*a(n-10) + 8*a(n-11) - 49*a(n-12) - 81*a(n-13) - 57*a(n-14) + 15*a(n-15) + 88*a(n-16) +106*a(n-17) + 48*a(n-18) - 48*a(n-19) -106*a(n-20) - 88*a(n-21) - 15*a(n-22) + 57*a(n-23) + 81*a(n-24) + 49*a(n-25) - 8*a(n-26) - 44*a(n-27) - 41*a(n-28) - 13*a(n-29) + 13*a(n-30) + 21*a(n-31) + 11*a(n-32) - 3*a(n-33) - 7*a(n-34) - 3*a(n-35) + a(n-36) + a(n-37). - Vaclav Kotesovec, Apr 05 2010

A176186 Number of ways to place 6 nonattacking queens on an n X n board.

Original entry on oeis.org

4, 832, 22708, 312956, 2716096, 17117832, 84871680, 349093856, 1239869972, 3905117168, 11139611892, 29224290600, 71402912960, 164029487484, 357164398040, 741835920276, 1477798367368, 2836053660668, 5263672510684, 9478352925488, 16606678238496, 28378012168908
Offset: 6

Views

Author

Artem M. Karavaev, Apr 11 2010

Keywords

Crossrefs

Cf. A108792.
Column k=6 of A348129.

Programs

  • Mathematica
    (* Alternative formula by Vaclav Kotesovec *)
    q6nn = 1/720*n^12-5/72*n^11+77/48*n^10-73339/3240*n^9+312727/1440*n^8-268283/180*n^7+26932229/3600*n^6-18719233399/680400*n^5+577434913967/7938000*n^4-117739826734/893025*n^3+112056711821/756000*n^2-393833819123/4762800*n+749037381271/68040000\
    +(1/24*n^7-27/16*n^6+1405/48*n^5-13477/48*n^4+114587/72*n^3-1496273/288*n^2+1216405/144*n-7467833/1728)*(-1)^n\
    +(25*n^3/4-124*n^2+856*n-26993/16)*Sqrt[2]*Cos[Pi*n/2+Pi/4]\
    +(33*n^3/4-1141*n^2/8+3027*n/4-463/16)*Sqrt[2]*Sin[Pi*n/2+Pi/4]\
    +2/243*((383792n-552926)*Cos[Pi*n/3]\
    +(493229-366386*n)*Cos[Pi*n/3+Pi/3]\
    +(531641-363074*n)*Sin[Pi*n/3+Pi/6])\
    +2*(366386*n-493229)*Sqrt[3]*Cos[2*Pi*n/3+Pi/6]/729\
    -(16*n^5/81-500*n^4/81+177880*n^3/2187-413456*n^2/729+767584*n/729-1105852/729)*Sqrt[3]*Sin[2*Pi*n/3]\
    +(32*n^5/81-320*n^4/27+325232*n^3/2187-77848*n^2/81+18116*n/9-832474/729)*Sqrt[3]*Sin[2*Pi*n/3+Pi/3]\
    +(2*n-11)/2*(Sqrt[2]+1)*Cos[Pi*n/4+Pi/4]\
    +(Sqrt[4+2*Sqrt[2]]/4)*((2*n+1)*Sin[Pi*n/4+Pi/8]+(2*n-7)*Sin[Pi*n/4+3*Pi/8])\
    +(2*n-11)/2*(Sqrt[2]-1)*Sin[3*Pi*n/4+Pi/4]\
    +(Sqrt[4-2*Sqrt[2]]/4)*((7-2*n)*Sin[3*Pi*n/4+Pi/8]+(2*n+1)*Sin[3*Pi*n/4+3*Pi/8])\
    +((4*Sqrt[50+10*Sqrt[5]])/3125)*((150*n^3-2842*n^2+27521*n-65479)*Cos[2*Pi*n/5+Pi/10]\
    -(100*n^3-1978*n^2+19118*n-54269)*Sin[2*Pi*n/5]\
    +2*(100*n^3-1778*n^2+16360*n-19739)*Sin[2*Pi*n/5+Pi/5]\
    -(50*n^3-1014*n^2+10311*n-30319)*Sin[2*Pi*n/5+2*Pi/5])\
    +((4*Sqrt[50-10*Sqrt[5]])/3125)*((50*n^3-1014*n^2+10311*n-30319)*Cos[4*Pi*n/5+3*Pi/10]\
    +(100*n^3-1978*n^2+19118*n-54269)*Sin[4*Pi*n/5]\
    -(150*n^3-2842*n^2+27521*n-65479)*Sin[4*Pi*n/5+Pi/5]\
    +2*(100*n^3-1778*n^2+16360*n-19739)*Sin[4*Pi*n/5+2*Pi/5])\
    +4/(343*Sin[Pi/7])*((989-160*n)*Cos[2*Pi*n/7+Pi/14]\
    +2*(335*n-1672)*Cos[2*Pi*n/7+3*Pi/14]\
    +(3409-600*n)*Sin[2*Pi*n/7]\
    +12*(95*n-173)*Sin[2*Pi*n/7+Pi/7]\
    +2*(926-145*n)*Sin[2*Pi*n/7+2*Pi/7]\
    +(920*n-3597)*Sin[2*Pi*n/7+3*Pi/7])\
    +4/(343*Cos[3*Pi/14])*(2*(145*n-926)*Cos[4*Pi*n/7+Pi/14]\
    +(920*n-3597)*Cos[4*Pi*n/7+5*Pi/14]\
    +(600*n-3409)*Sin[4*Pi*n/7]\
    +(989-160*n)*Sin[4*Pi*n/7+Pi/7]\
    +12*(95*n-173)*Sin[4*Pi*n/7+2*Pi/7]\
    +2*(1672-335*n)*Sin[4*Pi*n/7+3*Pi/7])\
    +4/(343*Cos[Pi/14])*((160*n-989)*Cos[6*Pi*n/7+3*Pi/14]\
    +2*(926-145*n)*Cos[6*Pi*n/7+5*Pi/14]\
    +(3409-600*n)*Sin[6*Pi*n/7]\
    +(3597-920*n)*Sin[6*Pi*n/7+2*Pi/7]\
    +12*(95*n-173)*Sin[6*Pi*n/7+3*Pi/7]\
    +2*(335*n-1672)*Sin[6*Pi*n/7+Pi/7])

Formula

Contribution from Artem M. Karavaev, May 10 2010: (Start)
a(n)=1/720*n^12-5/72*n^11+77/48*n^10-73339/3240*n^9
+312607/1440*n^8-66917/45*n^7+2226017/300*n^6
-9149222687/340200*n^5+102550276811/1488375*n^4
-2786721974671/23814000*n^3+453909010753/3969000*n^2
-2166093922711/47628000*n+1/432*(72*n^7-2916*n^6
+50580*n^5-485172*n^4+2750088*n^3-8977638*n^2+14596860*n
-7467833)*floor(1/2*n)+2/243*(216*n^5-6480*n^4+81308*n^3
-525474*n^2+1650126*n-1364199)*floor(1/3*n)
+1/243*(216*n^5-6750*n^4+88940*n^3-620184*n^2+2250534*n-3138465)*floor(1/3*n+1/3)
+1/4*(116*n^3-2133*n^2+12902*n-13728)*floor(1/4*n)
+1/4*(100*n^3-1984*n^2+13696*n-26993)*floor(1/4*n+1/4)
-1/4*(16*n^3-149*n^2-794*n+13265)*floor(1/4*n+1/2)
+8/125*(100*n^3-1778*n^2+16360*n-19739)*floor(1/5*n)
+4/125*(150*n^3-2842*n^2+27521*n-65479)*floor(1/5*n+1/5)
+4/125*(100*n^3-1978*n^2+19118*n-54269)*floor(1/5*n+2/5)
+4/125*(50*n^3-1014*n^2+10311*n-30319)*floor(1/5*n+3/5)
+2/27*(2118*n-4499)*floor(1/6*n)
+1/9*(1934*n-6633)*floor(1/6*n+1/6)
+2/27*(1566*n-10901)*floor(1/6*n+1/3)
-4/9*(92*n+1067)*floor(1/6*n+1/2)
-1/27*(2670*n+1903)*floor(1/6*n+2/3)
+48/49*(95*n-173)*floor(1/7*n)
+4/49*(920*n-3597)*floor(1/7*n+1/7)
+8/49*(335*n-1672)*floor(1/7*n+2/7)
+4/49*(600*n-3409)*floor(1/7*n+3/7)
+8/49*(145*n-926)*floor(1/7*n+4/7)
+4/49*(160*n-989)*floor(1/7*n+5/7)
+2*(2*n-5)*floor(1/8*n)
+2*(2*n-9)*floor(1/8*n+1/8)
+2*(2*n-11)*floor(1/8*n+1/4)
+2*(2*n-11)*floor(1/8*n+3/8)
-12*floor(1/8*n+1/2)
-4*floor(1/8*n+5/8).
G.f.: -4*x^6*(1+213*x+53192307*x^6+41638044492*x^11+6730*x^2+1148407*x^4
+109349*x^3+8814849*x^5+264701695*x^7+1124196463*x^8+4178943637*x^9
+13860639977*x^10+114647411058*x^12+65980784446603*x^21+39390545501971*x^20
+22595990341656*x^19+12422932793397*x^18+6526629468148*x^17
+3265443398940*x^16+1549727363371*x^15+694388440836*x^14
+106432971812268*x^22+165658741321711*x^23+249214616002036*x^24
+362914602952313*x^25+2587299110418159*x^33+2935747117591644*x^34
+3249296395578274*x^35+3508939440356435*x^36+3697993190167173*x^37
+3803816547345336*x^38+3819162259356822*x^39+3580483108767024*x^41
+512246494510867*x^26+701616116303232*x^27+933484654834212*x^28
+1207502931973542*x^29+1519776851512400*x^30+1862408041738532*x^31
+2223440299348897*x^32+3045052266009747*x^43+2706059061856895*x^44
+2345222492958126*x^45+1981371771386641*x^46+1631097942913736*x^47
+1307636222431031*x^48+1020253102328739*x^49+774143005387556*x^50
+570765121032393*x^51+408502373125992*x^52+283498964529980*x^53
+190537440843487*x^54+123839006896190*x^55+77709213130439*x^56
+46991003436040*x^57+27324795064304*x^58+15241746945993*x^59
+8132464535507*x^60+4137125169063*x^61+1998986925515*x^62
+913299307705*x^63+392473060699*x^64+157632673869*x^65+58720300345*x^66
+20096128176*x^67+6243623123*x^68+1733735219*x^69+421322394*x^70
+86868206*x^71+14475708*x^72+1769106*x^73+125388*x^74+292139023877*x^13
+3742970026288202*x^40+3342672506335632*x^42)
/(x-1)^13/(x+1)^8/(x^2+x+1)^6/(x^2+1)^4/(x^4+x^3+x^2+x+1)^4
/(x^2-x+1)^2/(x^6+x^5+x^4+x^3+x^2+x+1)^2/(x^4+1)^2.
Recurrence: a(0) = 0, a(1) = 0, a(2) = 0, a(3) = 0, a(4) = 0, a(5) = 0,
a(6) = 4,
a(7) = 832,
a(8) = 22708,
a(9) = 312956,
a(10) = 2716096,
a(11) = 17117832,
a(12) = 84871680,
a(13) = 349093856,
a(14) = 1239869972,
a(15) = 3905117168,
a(16) = 11139611892,
a(17) = 29224290600,
a(18) = 71402912960,
a(19) = 164029487484,
a(20) = 357164398040,
a(21) = 741835920276,
a(22) = 1477798367368,
a(23) = 2836053660668,
a(24) = 5263672510684,
a(25) = 9478352925488,
a(26) = 16606678238496,
a(27) = 28378012168908,
a(28) = 47398421913600,
a(29) = 77522788818316,
a(30) = 124365738451680,
a(31) = 195977208395580,
a(32) = 303748457927000,
a(33) = 463582807382736,
a(34) = 697434075907504,
a(35) = 1035256352634420,
a(36) = 1517521355687872,
a(37) = 2198354851112760,
a(38) = 3149525540545556,
a(39) = 4465340754179496,
a(40) = 6268789672000200,
a(41) = 8718985543275112,
a(42) = 12020393279930400,
a(43) = 16433877629761792,
a(44) = 22290259302807700,
a(45) = 30006374870365136,
a(46) = 40104595602917300,
a(47) = 53235736336244300,
a(48) = 70206658745546392,
a(49) = 92012392107526748,
a(50) = 119874540287319196,
a(51) = 155285624835663096,
a(52) = 200061731591400456,
a(53) = 256402868739653996,
a(54) = 326964160566718884,
a(55) = 414936937933564876,
a(56) = 524143826614930088,
a(57) = 659146400314780240,
a(58) = 825370726096096944,
a(59) = 1029248723087783480,
a(60) = 1278382175175730400,
a(61) = 1581726455456457436,
a(62) = 1949802708715765760,
a(63) = 2394934394370749612,
a(64) = 2931519277634600260,
a(65) = 3576331321283597364,
a(66) = 4348866396076652064,
a(67) = 5271724407012487004,
a(68) = 6371045245979662116,
a(69) = 7676988784016499040,
a(70) = 9224280528369282176,
a(71) = 11052810248193489712,
a(72) = 13208310203912865056,
a(73) = 15743096674420482872,
a(74) = 18716907492532573788,
a(75) = 22197814778572880876,
a(76) = 26263252803050925204,
a(77) = 31001134787399966700,
a(78) = 36511107035656245460,
a(79) = 42905907681877306448,
a(80) = 50312888556807094572,
a(n) = a(n-81)+5*a(n-80)+13*a(n-79)+21*a(n-78)+19*a(n-77)
-5*a(n-76)-57*a(n-75)-127*a(n-74)-184*a(n-73)-180*a(n-72)
-70*a(n-71)+162*a(n-70)+476*a(n-69)+768*a(n-68)
+889*a(n-67)+695*a(n-66)+114*a(n-65)-794*a(n-64)
-1806*a(n-63)-2570*a(n-62)-2701*a(n-61)-1929*a(n-60)
-234*a(n-59)+2072*a(n-58)+4374*a(n-57)+5898*a(n-56)
+5950*a(n-55)+4180*a(n-54)+771*a(n-53)-3521*a(n-52)
-7530*a(n-51)-9994*a(n-50)-9959*a(n-49)-7119*a(n-48)
-1994*a(n-47)+4156*a(n-46)+9657*a(n-45)+12909*a(n-44)
+12881*a(n-43)+9447*a(n-42)+3464*a(n-41)-3464*a(n-40)
-9447*a(n-39)-12881*a(n-38)-12909*a(n-37)-9657*a(n-36)
-4156*a(n-35)+1994*a(n-34)+7119*a(n-33)+9959*a(n-32)
+9994*a(n-31)+7530*a(n-30)+3521*a(n-29)-771*a(n-28)
-4180*a(n-27)-5950*a(n-26)-5898*a(n-25)-4374*a(n-24)
-2072*a(n-23)+234*a(n-22)+1929*a(n-21)+2701*a(n-20)
+2570*a(n-19)+1806*a(n-18)+794*a(n-17)-114*a(n-16)
-695*a(n-15)-889*a(n-14)-768*a(n-13)-476*a(n-12)
-162*a(n-11)+70*a(n-10)+180*a(n-9)+184*a(n-8)
+127*a(n-7)+57*a(n-6)+5*a(n-5)-19*a(n-4)-21*a(n-3)
-13*a(n-2)-5*a(n-1), n>80.
(End)

A178721 Number of ways to place 7 nonattacking queens on an n X n board.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 40, 3192, 119180, 2119176, 23636352, 186506000, 1131544008, 5613017128, 23670094984, 87463182432, 289367715488, 872345119896, 2427609997716, 6305272324272
Offset: 1

Views

Author

Vaclav Kotesovec, Jun 07 2010

Keywords

Crossrefs

Programs

  • Mathematica
    (* General formulas (denominator and recurrence) for k nonattacking queens on an n X n board: *) inversef[j_]:=(m=2;While[j>Fibonacci[m],m=m+1];m); denom[k_]:=(x-1)^(2k+1)*Product[Cyclotomic[j,x]^(2*(k-inversef[j]+1)),{j,2,Fibonacci[k]}]; Table[denom[k],{k,1,7}]//TraditionalForm Table[Sum[Coefficient[Expand[denom[k]],x,i]*Subscript[a,n-i],{i,0,Exponent[denom[k],x]}],{k,1,7}]//TraditionalForm

Formula

Denominator of G.f.: (x-1)^15*(x+1)^10*(x^2+x+1)^8*(x^2+1)^6*(x^4+x^3+x^2+x+1)^6*(x^2-x+1)^4*(x^6+x^5+x^4+x^3+x^2+x+1)^4*(x^4+1)^4*(x^6+x^3+1)^2*(x^4-x^3+x^2-x+1)^2*(x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1)^2*(x^4-x^2+1)^2*(x^12+x^11+x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1)^2.
Recurrence: a(n) = a(n-197) + 11a(n-196) + 66a(n-195) + 284a(n-194) + 979a(n-193) + 2867a(n-192) + 7391a(n-191) + 17167a(n-190) + 36502a(n-189) + 71854a(n-188) + 132001a(n-187) + 227579a(n-186) + 369573a(n-185) + 566345a(n-184) + 818910a(n-183) + 1114468a(n-182) + 1418684a(n-181) + 1667858a(n-180) + 1762862a(n-179) + 1567406a(n-178) + 913631a(n-177) - 382005a(n-176) - 2490306a(n-175) - 5527702a(n-174) - 9503162a(n-173) - 14258598a(n-172) - 19411273a(n-171) - 24310113a(n-170) - 28020291a(n-169) - 29351159a(n-168) - 26940769a(n-167) - 19405263a(n-166) - 5553140a(n-165) + 15346812a(n-164) + 43268288a(n-163) + 77138720a(n-162) + 114608227a(n-161) + 151932369a(n-160) + 184024666a(n-159) + 204725598a(n-158) + 207315406a(n-157) + 185268748a(n-156) + 133212155a(n-155) + 48004017a(n-154) - 70183102a(n-153) - 216930246a(n-152) - 382960078a(n-151) - 554012366a(n-150) - 711346353a(n-149) - 832955143a(n-148) - 895498622a(n-147) - 876864666a(n-146) - 759163548a(n-145) - 531860790a(n-144) - 194674273a(n-143) + 240182841a(n-142) + 746828188a(n-141) + 1285960424a(n-140) + 1806771216a(n-139) + 2250587298a(n-138) + 2556103772a(n-137) + 2665846492a(n-136) + 2533288725a(n-135) + 2129874995a(n-134) + 1451101463a(n-133) + 520790749a(n-132) - 607206046a(n-131) - 1850443990a(n-130) - 3102719461a(n-129) - 4242198625a(n-128) - 5142328327a(n-127) - 5684628585a(n-126) - 5772140029a(n-125) - 5342085203a(n-124) - 4376237801a(n-123) - 2907601789a(n-122) - 1022286568a(n-121) + 1144093134a(n-120) + 3415602536a(n-119) + 5590244180a(n-118) + 7458159648a(n-117) + 8822115392a(n-116) + 9518231826a(n-115) + 9434741790a(n-114) + 8526633540a(n-113) + 6824351658a(n-112) + 4435274433a(n-111) + 1537407289a(n-110) - 1634445881a(n-109) - 4808938651a(n-108) - 7703022656a(n- 107) - 10048957558a(n-106) - 11620750186a(n-105) - 12257251526a(n-104) - 11879415820a(n-103) - 10499785534a(n-102) - 8223052813a(n-101) - 5237477687a(n-100) - 1797913038a(n-99) + 1797913038a(n-98) + 5237477687a(n-97) + 8223052813a(n-96) + 10499785534a(n-95) + 11879415820a(n-94) + 12257251526a(n-93) + 11620750186a(n-92) + 10048957558a(n-91) + 7703022656a(n-90) + 4808938651a(n-89) + 1634445881a(n-88) - 1537407289a(n-87) - 4435274433a(n-86) - 6824351658a(n-85) - 8526633540a(n-84) - 9434741790a(n-83) - 9518231826a(n-82) - 8822115392a(n-81) - 7458159648a(n-80) - 5590244180a(n-79) - 3415602536a(n-78) - 1144093134a(n-77) + 1022286568a(n-76) + 2907601789a(n-75) + 4376237801a(n-74) + 5342085203a(n-73) + 5772140029a(n-72) + 5684628585a(n-71) + 5142328327a(n-70) + 4242198625a(n-69) + 3102719461a(n-68) + 1850443990a(n-67) + 607206046a(n-66) - 520790749a(n-65) - 1451101463a(n-64) - 2129874995a(n-63) - 2533288725a(n-62) - 2665846492a(n-61) - 2556103772a(n-60) - 2250587298a(n-59) - 1806771216a(n-58) - 1285960424a(n-57) - 746828188a(n-56) - 240182841a(n-55) + 194674273a(n-54) + 531860790a(n-53) + 759163548a(n-52) + 876864666a(n-51) + 895498622a(n-50) + 832955143a(n-49) + 711346353a(n-48) + 554012366a(n-47) + 382960078a(n-46) + 216930246a(n-45) + 70183102a(n-44) - 48004017a(n-43) - 133212155a(n-42) - 185268748a(n-41) - 207315406a(n-40) - 204725598a(n-39) - 184024666a(n-38) - 151932369a(n-37) - 114608227a(n-36) - 77138720a(n-35) - 43268288a(n-34) - 15346812a(n-33) + 5553140a(n-32) + 19405263a(n-31) + 26940769a(n-30) + 29351159a(n-29) + 28020291a(n-28) + 24310113a(n-27) + 19411273a(n-26) + 14258598a(n-25) + 9503162a(n-24) + 5527702a(n-23) + 2490306a(n-22) + 382005a(n-21) - 913631a(n-20) - 1567406a(n-19) - 1762862a(n-18) - 1667858a(n-17) - 1418684a(n-16) - 1114468a(n-15) - 818910a(n-14) - 566345a(n-13) - 369573a(n-12) - 227579a(n-11) - 132001a(n-10) - 71854a(n-9) - 36502a(n-8) - 17167a(n-7) - 7391a(n-6) - 2867a(n-5) - 979a(n-4) - 284a(n-3) - 66a(n-2) - 11a(n-1).

Extensions

a(19)-a(20) from Vaclav Kotesovec, Jun 16 2010

A287227 Number of independent vertex sets and vertex covers in the n X n queen graph.

Original entry on oeis.org

1, 2, 5, 18, 87, 462, 2635, 16870, 118969, 915442, 7535369, 66807234, 633443407, 6354135838, 67480769839, 754734433310, 8870886701401
Offset: 0

Views

Author

Eric W. Weisstein, May 22 2017

Keywords

Crossrefs

Row sums of A348129.

Extensions

a(0)=1 prepended by Alois P. Heinz, Oct 01 2021
a(11)-a(14) from Eric W. Weisstein, Feb 03 2023
a(15) from Eric W. Weisstein, Feb 04 2023
a(16) from Eric W. Weisstein, Feb 10 2023

A252593 Number of ways to place 8 nonattacking queens on an n X n board.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 92, 13848, 636524, 14803480, 207667564, 2008758532, 14752426528, 87154016752, 432539436508, 1858901487620
Offset: 1

Views

Author

Antal Pinter, Dec 18 2014

Keywords

Comments

Conjectured recurrence order is 477 (see "Non-attacking chess pieces", p. 19). - Vaclav Kotesovec, Dec 19 2014

Crossrefs

Formula

a(n) = n^16/40320 - n^15/432 + 221*n^14/2160 + O(n^13). - Vaclav Kotesovec, Dec 19 2014

Extensions

a(16) from Vaclav Kotesovec, Dec 19 2014
a(17) from Vaclav Kotesovec, Dec 20 2014

A269133 Number of ways to place m nonattacking queens on an m X n board, 1 <= m <= n (triangular array).

Original entry on oeis.org

1, 2, 0, 3, 2, 0, 4, 6, 4, 2, 5, 12, 14, 12, 10, 6, 20, 36, 46, 40, 4, 7, 30, 76, 140, 164, 94, 40, 8, 42, 140, 344, 568, 550, 312, 92, 9, 56, 234, 732, 1614, 2292, 2038, 1066, 352, 10, 72, 364, 1400, 3916, 7552, 9632, 7828, 4040, 724, 11, 90, 536, 2468, 8492, 21362, 37248, 44148, 34774, 15116, 2680, 12, 110, 756, 4080, 16852, 52856, 120104, 195270, 222720, 160964, 68264, 14200
Offset: 1

Views

Author

Marko Riedel, Feb 19 2016

Keywords

Examples

			The triangular array begins:
   n\m  1   2   3    4     5     6      7      8      9     10    11    12
   1    1
   2    2   0
   3    3   2   0
   4    4   6   4    2
   5    5  12  14   12    10
   6    6  20  36   46    40     4
   7    7  30  76  140   164    94     40
   8    8  42 140  344   568   550    312     92
   9    9  56 234  732  1614  2292   2038   1066    352
  10   10  72 364 1400  3916  7552   9632   7828   4040    724
  11   11  90 536 2468  8492 21362  37248  44148  34774  15116  2680
  12   12 110 756 4080 16852 52856 120104 195270 222720 160964 68264 14200
...
		

Crossrefs

Cf. A000027 (m=1), A002378 (m=2), A061989 (m=3), A061990 (m=4), A061991 (m=5), A061992 (m=6), A061993 (m=7), A172449 (m=8).
Cf. A036464 (2Q), A047659 (3Q), A061994 (4Q), A108792 (5Q), A176186 (6Q).
Cf. A006717, A051906, A319284 (backtrack trees).

Programs

  • PARI
    {A269133(m, n, B=[], t=if(#B, setminus(n, Set(concat(B+t=[-#B..-1], B-t))), n=[1..n]))= if(#B < m-1, vecsum([A269133(m, setminus(n, [t]), concat(B,t)) | t<-t]), #t)} \\ M. F. Hasler, Jan 11 2022
Showing 1-10 of 11 results. Next