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

A024023 a(n) = 3^n - 1.

Original entry on oeis.org

0, 2, 8, 26, 80, 242, 728, 2186, 6560, 19682, 59048, 177146, 531440, 1594322, 4782968, 14348906, 43046720, 129140162, 387420488, 1162261466, 3486784400, 10460353202, 31381059608, 94143178826, 282429536480, 847288609442, 2541865828328, 7625597484986, 22876792454960
Offset: 0

Views

Author

Keywords

Comments

Number of different directions along lines and hyper-diagonals in an n-dimensional cubic lattice for the attacking queens problem (A036464 in n=2, A068940 in n=3 and A068941 in n=4). The n-dimensional direction vectors have the a(n)+1 Cartesian coordinates (i,j,k,l,...) where i,j,k,l,... = -1, 0, or +1, excluding the zero-vector i=j=k=l=...=0. The corresponding hyper-line count is A003462. - R. J. Mathar, May 01 2006
Total number of sequences of length m=1,...,n with nonzero integer elements satisfying the condition Sum_{k=1..m} |n_k| <= n. See the K. A. Meissner link p. 6 (with a typo: it should be 3^([2a]-1)-1). - Wolfdieter Lang, Jan 21 2008
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if x and y are disjoint and either 0) x is a proper subset of y or y is a proper subset of x, or 1) x is not a subset of y and y is not a subset of x. Then a(n) = |R|. - Ross La Haye, Mar 19 2009
Number of neighbors in Moore's neighborhood in n dimensions. - Dmitry Zaitsev, Nov 30 2015
Number of terms in conjunctive normal form of Boolean expression with n variables. E.g., a(2) = 8: [~x, ~y, x, y, ~x|~y, ~x|y, x|~y, x|y]. - Yuchun Ji, May 12 2023
Number of rays of the Coxeter arrangement of type B_n. Equivalently, number of facets of the n-dimensional type B permutahedron. - Jose Bastidas, Sep 12 2023

Examples

			From _Zerinvary Lajos_, Jan 14 2007: (Start)
Ternary......decimal:
0...............0
2...............2
22..............8
222............26
2222...........80
22222.........242
222222........728
2222222......2186
22222222.....6560
222222222...19682
2222222222..59048
etc...........etc.
(End)
Sequence combinatorics: n=3: With length m=1: [1],[2],[3] each with 2 signs, with m=2: [1,1], [1,2], [2,1], each 2^2 = 4 times from choosing signs; m=3: [1,1,1] coming in 2^3 signed versions: 3*2 + 3*4 + 1*8 = 26 = a(3). The order is important, hence the M_0 multinomials A048996 enter as factors.
A027902 gives the 384 divisors of a(24). - _Reinhard Zumkeller_, Mar 11 2010
		

References

  • Mordechai Ben-Ari, Mathematical Logic for Computer Science, Third edition, 173-203.

Crossrefs

Cf. triangle A013609.
Cf. second column of A145901.

Programs

Formula

a(n) = A000244(n) - 1.
a(n) = 2*A003462(n). - R. J. Mathar, May 01 2006
A128760(a(n)) > 0. - Reinhard Zumkeller, Mar 25 2007
G.f.: 2*x/((-1+x)*(-1+3*x)) = 1/(-1+x) - 1/(-1+3*x). - R. J. Mathar, Nov 19 2007
a(n) = Sum_{k=1..n} Sum_{m=1..k} binomial(k-1,m-1)*2^m, n >= 1. a(0)=0. From the sequence combinatorics mentioned above. Twice partial sums of powers of 3.
E.g.f.: e^(3*x) - e^x. - Mohammad K. Azarian, Jan 14 2009
a(n) = A024101(n)/A034472(n). - Reinhard Zumkeller, Feb 14 2009
a(n) = 3*a(n-1) + 2 (with a(0)=0). - Vincenzo Librandi, Nov 19 2010
E.g.f.: -E(0) where E(k) = 1 - 3^k/(1 - x/(x - 3^k*(k+1)/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 06 2012
a(n) = A227048(n,A020914(n)). - Reinhard Zumkeller, Jun 30 2013
Sum_{n>=1} 1/a(n) = A214369. - Amiram Eldar, Nov 11 2020
a(n) = Sum_{k=1..n} 2^k*binomial(n,k). - Ridouane Oudra, Jun 15 2025
From Peter Bala, Jul 01 2025: (Start)
For n >= 1, a(2*n)/a(n) = A034472(n) and a(3*n)/a(n) = A034513(n).
Modulo differences in offsets, exp( Sum_{n >= 1} a(k*n)/a(n)*x^n/n ) is the o.g.f. of A003462 (k = 2), A006100 (k = 3), A006101 (k = 4), A006102 (k = 5), A022196 (k = 6), A022197 (k = 7), A022198 (k = 8), A022199 (k = 9), A022200 (k = 10), A022201 (k = 11), A022202 (k = 12) and A022203 (k = 13).
The following are all examples of telescoping series:
Sum_{n >= 1} 3^n/(a(n)*a(n+1)) = 1/2^2; Sum_{n >= 1} 3^n/(a(n)*a(n+1)*a(n+2)) = 1/(2*8^2).
In general, for k >= 1, Sum_{n >= 1} 3^n/(a(n)*a(n+1)*...*a(n+k)) = 1/(a(1)*a(2)*...*a(k)*a(k)).
Sum_{n >= 1} 3^n/(a(n)*a(n+2)) = 5/64; Sum_{n >= 1} (-3)^n/(a(n)*a(n+2)) = -3/64.
Sum_{n >= 1} 3^n/(a(n)*a(n+4)) = 703/83200; Sum_{n >= 1} (-3)^n/(a(n)*a(n+4)) = - 417/83200. (End)

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

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

A172123 Number of ways to place 2 nonattacking bishops on an n X n board.

Original entry on oeis.org

0, 4, 26, 92, 240, 520, 994, 1736, 2832, 4380, 6490, 9284, 12896, 17472, 23170, 30160, 38624, 48756, 60762, 74860, 91280, 110264, 132066, 156952, 185200, 217100, 252954, 293076, 337792, 387440, 442370, 502944, 569536, 642532
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

Cf. A036464.

Programs

  • Magma
    [n*(n-1)*(3*n^2-n+2)/6: n in [1..40]]; // Vincenzo Librandi, Apr 29 2013
    
  • Magma
    I:=[0, 4, 26, 92, 240]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..40]]; // Vincenzo Librandi, Apr 29 2013
    
  • Mathematica
    CoefficientList[Series[-2 x (x+1)(x+2)/(x-1)^5, {x, 0, 80}], x] (* Vincenzo Librandi, Apr 29 2013 *)
  • PARI
    a(n)=n*(n-1)*(3*n^2-n+2)/6 \\ Charles R Greathouse IV, Jun 16 2015

Formula

a(n) = n*(n - 1)*(3*n^2 - n + 2)/6.
G.f.: -2*x^2*(x+1)*(x+2)/(x-1)^5. - Vaclav Kotesovec, Mar 25 2010
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5). - Vincenzo Librandi, Apr 29 2013

A172225 Number of ways to place 2 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 2, 24, 96, 260, 570, 1092, 1904, 3096, 4770, 7040, 10032, 13884, 18746, 24780, 32160, 41072, 51714, 64296, 79040, 96180, 115962, 138644, 164496, 193800, 226850, 263952, 305424, 351596, 402810, 459420, 521792, 590304
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

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

References

  • Christian Poisson, Echecs et mathematiques, Rex Multiplex 29/1990, p. 829.

Crossrefs

Programs

  • Magma
    I:=[0, 2, 24, 96, 260]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
    
  • Magma
    [n*(n-1)*(n^2+n-4)/2: n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
  • Mathematica
    Table[n (n - 1) (n^2 + n - 4) / 2, {n, 40}] (* Vincenzo Librandi, Apr 30 2013 *)
    LinearRecurrence[{5,-10,10,-5,1},{0,2,24,96,260},40] (* Harvey P. Dale, Jun 04 2023 *)

Formula

Explicit formula (Christian Poisson, 1990): a(n) = n*(n-1)*(n^2+n-4)/2.
G.f.: 2*x^2*(2*x^2-7*x-1)/(x-1)^5. - Vaclav Kotesovec, Mar 25 2010
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Vincenzo Librandi, Apr 30 2013
a(n) = 2*A239352(n). - R. J. Mathar, Jan 09 2018
a(n) = A232833(n,2). - R. J. Mathar, Apr 11 2024

A172132 Number of ways to place 2 nonattacking knights on an n X n board.

Original entry on oeis.org

0, 6, 28, 96, 252, 550, 1056, 1848, 3016, 4662, 6900, 9856, 13668, 18486, 24472, 31800, 40656, 51238, 63756, 78432, 95500, 115206, 137808, 163576, 192792, 225750, 262756, 304128, 350196, 401302, 457800, 520056, 588448, 663366
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=2 of A244081.

Programs

  • Magma
    I:=[0, 6, 28, 96, 252]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
    
  • Magma
    [(n-1)*(n+4)*(n^2-3*n+4)/2: n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
    
  • Mathematica
    Table[(n-1)(n+4)(n^2 -3n +4)/2, {n, 40}] (* Vincenzo Librandi, Apr 30 2013 *)
  • SageMath
    [(n-1)*(n+4)*(n^2-3*n+4)/2 for n in (1..40)] # G. C. Greubel, Apr 18 2022

Formula

a(n) = (n - 1)*(n + 4)*(n^2 - 3*n + 4)/2.
G.f.: 2*(12*x^4-39*x^3+37*x^2-20*x+4)/(x-1)^5. - Vaclav Kotesovec, Mar 25 2010
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5). - Vincenzo Librandi, Apr 30 2013
E.g.f.: (1/2)*(16 + (-16 + 16*x - 2*x^2 + 6*x^3 + x^4)*exp(x)). - G. C. Greubel, Apr 18 2022

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.

A172517 Number of ways to place 2 nonattacking queens on an n X n toroidal board.

Original entry on oeis.org

0, 0, 0, 32, 100, 288, 588, 1152, 1944, 3200, 4840, 7200, 10140, 14112, 18900, 25088, 32368, 41472, 51984, 64800, 79380, 96800, 116380, 139392, 165000, 194688, 227448, 264992, 306124, 352800, 403620, 460800, 522720, 591872, 666400, 749088, 837828
Offset: 1

Views

Author

Vaclav Kotesovec, Feb 05 2010

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- 4 x^3 (x^3 + 6 x^2 + 9 x + 8) / ((x - 1)^5 (x + 1)^3), {x, 0, 50}], x] (* Vincenzo Librandi, May 29 2013 *)
    LinearRecurrence[{2,2,-6,0,6,-2,-2,1},{0,0,0,32,100,288,588,1152},40] (* Harvey P. Dale, Sep 22 2015 *)

Formula

a(n) = n^2*(n-2)^2/2 if n is even and a(n) = n^2*(n-1)(n-3)/2 if n is odd.
G.f.: -4*x^4*(x^3+6*x^2+9*x+8) / ((x-1)^5*(x+1)^3). - Colin Barker, Jan 09 2013
a(n) = 2*a(n-1)+2*a(n-2)-6*a(n-3)+6*a(n-5)-2*a(n-6)-2*a(n-7)+a(n-8). - Wesley Ivan Hurt, May 28 2021

A172141 Number of ways to place 2 nonattacking nightriders on an n X n board.

Original entry on oeis.org

0, 6, 28, 96, 240, 518, 980, 1712, 2784, 4310, 6380, 9136, 12688, 17206, 22820, 29728, 38080, 48102, 59964, 73920, 90160, 108966, 130548, 155216, 183200, 214838, 250380, 290192, 334544, 383830, 438340, 498496, 564608, 637126
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 26 2010

Keywords

Comments

A nightrider is a fairy chess piece that can move (proportionate to how a knight moves) in any direction.

References

  • Christian Poisson, Echecs et mathematiques, Rex Multiplex 29/1990, p.829

Crossrefs

Programs

  • Magma
    [(n/12)*(3*(-1)^n -(11 -18*n +10*n^2 -6*n^3)): n in [1..40]]; // G. C. Greubel, Apr 21 2022
    
  • Mathematica
    CoefficientList[Series[2*x*(3+2*x+x^2)*(1+x+2*x^2)/((1-x)^5*(1+x)^2), {x,0,40}], x] (* Vincenzo Librandi, May 27 2013 *)
  • SageMath
    [(n/12)*(3*(-1)^n -(11 -18*n +10*n^2 -6*n^3)) for n in (1..40)] # G. C. Greubel, Apr 21 2022

Formula

Explicit formula (Christian Poisson, 1990): a(n) = n*(3*n^3 - 5*n^2 + 9*n - 4)/6 if n is even and a(n) = n*(n - 1)*(3*n^2 - 2*n + 7)/6 if n is odd.
G.f.: 2*x^2*(3+2*x+x^2)*(1+x+2*x^2)/((1-x)^5*(1+x)^2). - Vaclav Kotesovec, Mar 25 2010
From G. C. Greubel, Apr 21 2022: (Start)
a(n) = (1/12)*n*(3*(-1)^n - (11 - 18*n + 10*n^2 - 6*n^3)).
E.g.f.: (x/12)*(-3*exp(-x) + (3 + 30*x + 26*x^2 + 6*x^3)exp(x)). (End)
Showing 1-10 of 18 results. Next