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 22 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

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

A002624 Expansion of (1-x)^(-3) * (1-x^2)^(-2).

Original entry on oeis.org

1, 3, 8, 16, 30, 50, 80, 120, 175, 245, 336, 448, 588, 756, 960, 1200, 1485, 1815, 2200, 2640, 3146, 3718, 4368, 5096, 5915, 6825, 7840, 8960, 10200, 11560, 13056, 14688, 16473, 18411, 20520, 22800, 25270, 27930, 30800, 33880, 37191, 40733, 44528
Offset: 0

Views

Author

Keywords

Comments

Given an irregular triangular matrix M with the triangular numbers in every column shifted down twice for columns >0, A002624 = M * [1, 2, 3, ...]. Example: row 4 of triangle M = (15, 6, 1), then (15, 6, 1) dot (1, 2, 3) = a(4) = 30 = (15 + 12 + 3). - Gary W. Adamson, Mar 02 2010
The Kn21, Kn22, Kn23, Fi2 and Ze2 triangle sums of A139600 are related to the sequence given above, e.g., Ze2(n) = a(n-1) - a(n-2) - a(n-3) + 4*a(n-4), with a(n) = 0 for n <= -1. For the definitions of these triangle sums see A180662. - Johannes W. Meijer, Apr 29 2011
8*a(n) + 16*a(n+1) + 16*a(n+2) is the number of ways to place 3 queens on an (n+6) X (n+6) chessboard so that they diagonally attack each other exactly twice. Also true for the nonexistent terms for n=-1, n=-2 and n=-3 assuming that they are zeros. In graph-theory representation they thus form the corresponding open walk (Eulerian trail) with V={1,2,3} vertices and length of 2. - Antal Pinter, Dec 31 2015
a(n) is the number of partitions of n into parts with three kinds of 1 and two kinds of 2. - Joerg Arndt, Jan 18 2016

References

  • 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

Programs

  • Magma
    [( (n+1)^4 +10*(n+1)^3 +32*(n+1)^2 +32*(n+1) +(6*(n+1) +15)*((n+1) mod 2) )/96 : n in [0..50]]; // Vincenzo Librandi, Oct 08 2011
    
  • Maple
    A002624:=-1/(z+1)**2/(z-1)**5; # Simon Plouffe in his 1992 dissertation
  • Mathematica
    f[n_] := Block[{m = n - 1}, (m^4 + 10m^3 + 32m^2 + 32m + (6m + 15)Mod[m, 2])/96]; Table[ f[n], {n, 2, 45}]
    (* Or *) CoefficientList[ Series[1/((1 - x)^3 (1 - x^2)^2), {x, 0, 44}], x] (* Robert G. Wilson v, Feb 26 2005 *)
  • PARI
    Vec(1/(1-x)^3/(1-x^2)^2+O(x^99)) \\ Charles R Greathouse IV, Apr 19 2012
    
  • PARI
    a(n)=(n^4 + 14*n^3 + 68*n^2 + 136*n - n%2*(6*n + 21))/96 + 1 \\ Charles R Greathouse IV, Feb 18 2016

Formula

a(n-1) = ( n^4 +10*n^3 +32*n^2 +32*n +(6*n +15)*(n mod 2) )/96.
From Antal Pinter, Oct 03 2014: (Start)
a(n) = C(n + 2, 2) + 2*C(n, 2) + 3*C(n - 2, 2) + 4*C(n - 4, 2) + ...
a(n) = Sum_{i = 1..z} i*C(n + 4 - 2i, 2) where z = (2*n + 3 + (-1)^n)/4.
a(n) = (3*(2*n + 7)*(-1)^n + 2*n^4 + 28*n^3 + 136*n^2 + 266*n + 171)/192.
(End)
a(n) = A007009(n+1) - A001752(n-1) for n>0. - Antal Pinter, Dec 27 2015
a(n) = Sum_{j=0..n+1} A006918(j). - Richard Turk, Feb 18 2016

Extensions

Formula and more terms from Frank Ellermann, Mar 14 2002

A172124 Number of ways to place 3 nonattacking bishops on an n X n board.

Original entry on oeis.org

0, 0, 26, 232, 1124, 3896, 10894, 26192, 56296, 110960, 204130, 355000, 589196, 940072, 1450134, 2172576, 3172944, 4530912, 6342186, 8720520, 11799860, 15736600, 20711966, 26934512, 34642744, 44107856, 55636594, 69574232
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 26 2010

Keywords

References

  • E. Bonsdorff, K. Fabel, O. Riihimaa, Schach und Zahl, 1966, p. 51-63

Crossrefs

Programs

  • Magma
    [(n*(n-2)*(2*n^4 -4*n^3 +7*n^2 -6*n +4) +3*(n mod 2))/12: n in [1..40]]; // G. C. Greubel, Apr 16 2022
    
  • Mathematica
    CoefficientList[Series[2x^2(3x^4 +18x^3 +48x^2 +38x +13)/((1-x)^7 (x+1)), {x, 0, 30}], x] (* Vincenzo Librandi, May 26 2013 *)
  • SageMath
    [(n*(n-2)*(2*n^4 -4*n^3 +7*n^2 -6*n +4) +3*(n%2))/12 for n in (1..40)] # G. C. Greubel, Apr 16 2022

Formula

Explicit formulas (Karl Fabel, 1966): (Start)
a(n) = n*(n-2)*(2*n^4 - 4*n^3 + 7*n^2 - 6*n + 4)/12 if n is even.
a(n) = (n-1)*(2*n^5 - 6*n^4 + 9*n^3 - 11*n^2 + 5*n - 3)/12 if n is odd. (End)
G.f.: 2*x^3*(13+38*x+48*x^2+18*x^3+3*x^4)/((1-x)^7*(1+x)). - .Vaclav Kotesovec, Mar 25 2010
a(n) = (2*(n-2)*n*(2*n^4-4*n^3+7*n^2-6*n+4)-3*(-1)^n+3)/24. - Bruno Berselli, May 26 2013
E.g.f.: (1/24)*( (3 - 6*x + 6*x^2 + 100*x^3 + 130*x^4 + 44*x^5 + 4*x^6)*exp(x) - 3*exp(-x) ). - G. C. Greubel, Apr 16 2022

A172134 Number of ways to place 3 nonattacking knights on an n X n board.

Original entry on oeis.org

0, 4, 36, 276, 1360, 4752, 13340, 32084, 68796, 135040, 247152, 427380, 705144, 1118416, 1715220, 2555252, 3711620, 5272704, 7344136, 10050900, 13539552, 17980560, 23570764, 30535956, 39133580, 49655552, 62431200, 77830324
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 26 2010

Keywords

References

  • E. Bonsdorff, K. Fabel, O. Riihimaa, Schach und Zahl, 1966, p. 51-63

Crossrefs

Column k=3 of A244081.

Programs

  • Magma
    [n le 3 select (n*(n-1))^2 else (n-2)*(n+5)*(n^4 -3*n^3 -8*n^2 +66*n -108)/6: n in [1..50]]; // G. C. Greubel, Apr 18 2022
    
  • Mathematica
    CoefficientList[Series[4x(3x^8 -20x^7 +43x^6 -38x^5 +23x^4 -11x^3 -27x^2 -2x -1)/ (x-1)^7, {x, 0, 40}], x] (* Vincenzo Librandi, May 02 2013 *)
  • SageMath
    def A172134(n):
        if (n<4): return (n*(n-1))^2
        else: return (n-2)*(n+5)*(n^4 -3*n^3 -8*n^2 +66*n -108)/6
    [A172134(n) for n in (1..50)] # G. C. Greubel, Apr 18 2022

Formula

Explicit formula (Karl Fabel, 1966): a(n) = (n - 2)*(n + 5)*(n^4 - 3*n^3 - 8*n^2 + 66*n - 108)/6, for n >= 4.
G.f.: 4*x^2*(3*x^8-20*x^7+43*x^6-38*x^5+23*x^4-11*x^3-27*x^2-2*x-1)/(x-1)^7. - Vaclav Kotesovec, Mar 25 2010
From G. C. Greubel, Apr 18 2022: (Start)
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 >= 11.
E.g.f.: (1/6)*(-1080 - 312*x + 12*x^2 +13*x^3 + (1080 - 768*x + 228*x^2 + 38*x^4 + 15*x^5 + x^6)*exp(x)). (End)

A172226 Number of ways to place 3 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 0, 22, 276, 1474, 5248, 14690, 35012, 74326, 144544, 262398, 450580, 739002, 1166176, 1780714, 2642948, 3826670, 5420992, 7532326, 10286484, 13830898, 18336960, 24002482, 31054276, 39750854, 50385248, 63287950
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

A wazir is a (fairy chess) leaper [0,1].

Crossrefs

Programs

  • Magma
    I:=[0, 0, 22, 276, 1474, 5248, 14690, 35012]; [n le 8 select I[n] else 7*Self(n-1)-21*Self(n-2)+35*Self(n-3)-35*Self(n-4)+21*Self(n-5)-7*Self(n-6)+Self(n-7): n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
    
  • Magma
    [0] cat [(n-2)*(n^5+2*n^4-11*n^3-10*n^2+42*n-12)/6: n in [2..30]]; // Vincenzo Librandi, Apr 30 2013
  • Maple
    A172226:=n->`if`(n=1, 0, (n-2)*(n^5 + 2*n^4 - 11*n^3 - 10*n^2 + 42*n - 12)/6); seq(A172226(n), n=1..60); # Wesley Ivan Hurt, Feb 06 2014
  • Mathematica
    CoefficientList[Series[2 x^2 (x^5 - 9 x^4 + 22 x^3 - 2  x^2 - 61 x - 11) / (x-1)^7, {x, 0, 60}], x] (* Vincenzo Librandi, Apr 30 2013 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,0,22,276,1474,5248,14690,35012},30] (* Harvey P. Dale, Apr 08 2022 *)

Formula

a(n) = (n-2)*(n^5 + 2*n^4 - 11*n^3 - 10*n^2 + 42*n - 12)/6, n>=2.
G.f.: 2*x^3*(x^5-9*x^4+22*x^3-2*x^2-61*x-11)/(x-1)^7. - Vaclav Kotesovec, Mar 25 2010
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). - Vincenzo Librandi, Apr 30 2013
a(n) = A232833(n,3). - R. J. Mathar, Apr 11 2024

A348129 Number T(n,k) of ways to place k nonattacking queens on an n X n board; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 4, 0, 1, 9, 8, 0, 1, 16, 44, 24, 2, 1, 25, 140, 204, 82, 10, 1, 36, 340, 1024, 982, 248, 4, 1, 49, 700, 3628, 7002, 4618, 832, 40, 1, 64, 1288, 10320, 34568, 46736, 22708, 3192, 92, 1, 81, 2184, 25096, 131248, 310496, 312956, 119180, 13848, 352, 1, 100, 3480, 54400, 412596, 1535440, 2716096, 2119176, 636524, 56832, 724
Offset: 0

Views

Author

Alois P. Heinz, Oct 01 2021

Keywords

Examples

			T(3,2) = 8:
  .-----. .-----. .-----. .-----. .-----. .-----. .-----. .-----.
  |Q . .| |Q . .| |. . Q| |. . Q| |. . .| |. Q .| |. Q .| |. . .|
  |. . Q| |. . .| |. . .| |Q . .| |Q . .| |. . .| |. . .| |. . Q|
  |. . .| |. Q .| |. Q .| |. . .| |. . Q| |. . Q| |Q . .| |Q . .|
  `-----´ `-----´ `-----´ `-----´ `-----´ `-----´ `-----´ `-----´.
Triangle T(n,k) begins:
  1;
  1,  1;
  1,  4,    0;
  1,  9,    8,     0;
  1, 16,   44,    24,      2;
  1, 25,  140,   204,     82,     10;
  1, 36,  340,  1024,    982,    248,      4;
  1, 49,  700,  3628,   7002,   4618,    832,     40;
  1, 64, 1288, 10320,  34568,  46736,  22708,   3192,    92;
  1, 81, 2184, 25096, 131248, 310496, 312956, 119180, 13848, 352;
  ...
		

Crossrefs

Main diagonal gives A000170.
Row sums give A287227.
T(2n,n) gives A348130.

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

Original entry on oeis.org

0, 0, 0, 0, 100, 576, 2156, 7168, 17496, 41600, 82280, 161280, 280540, 486080, 774900, 1232896, 1844976, 2757888, 3933456, 5606400, 7699860, 10570560, 14081980, 18754560, 24365000, 31647616, 40258296, 51204608, 63979916
Offset: 1

Views

Author

Vaclav Kotesovec, Feb 05 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- 4 x^4 (9 x^6 + 94 x^5 + 199 x^4 + 388 x^3 + 151 x^2 + 94 x + 25) / ((x - 1)^7 (x + 1)^5), {x, 0, 50}], x] (* Vincenzo Librandi, May 29 2013 *)
    LinearRecurrence[{2,4,-10,-5,20,0,-20,5,10,-4,-2,1},{0,0,0,0,100,576,2156,7168,17496,41600,82280,161280},30] (* Harvey P. Dale, Dec 27 2014 *)

Formula

a(n) = n^2*(n-2)*(n-4)*(n^2-6*n+12)/6 if n is even and a(n) = n^2*(n-1)*(n-3)*(n^2-8*n+18)/6 if n is odd. - Vaclav Kotesovec, Jan 31 2010
G.f.: -4*x^5*(9*x^6+94*x^5+199*x^4+388*x^3+151*x^2+94*x+25) / ((x-1)^7*(x+1)^5). - Colin Barker, Jan 09 2013
Showing 1-10 of 22 results. Next