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

A090741 Maximum number of transversals in a Latin square of order n.

Original entry on oeis.org

1, 0, 3, 8, 15, 32, 133, 384, 2241
Offset: 1

Views

Author

Richard Bean, Feb 03 2004

Keywords

Comments

a(10) >= 5504 from Parker.
a(n) >= the number of transversals in a cyclic Latin square of the same order which for odd n is given by A006717((n-1)/2). - Eduard I. Vatutin, Nov 04 2020

Examples

			a(1), a(3), a(5), a(7) are from the group tables for Z_1, Z_3, Z_5 and Z_7 (see sequence A006717); a(4) and a(8) are from Z_2 x Z_2 and the non-cyclic groups of order 8 (see Bedford).
a(9) = 2241 from Z_3 x Z_3.
		

References

  • J. W. Brown, F. Cherry, L. Most, M. Most, E. T. Parker, W. D. Wallis, Completion of the spectrum of orthogonal diagonal Latin squares, Lecture notes in pure and applied mathematics. 1992. Vol. 139. pp. 43-49.
  • E. T. Parker, Computer investigations of orthogonal Latin squares of order 10, Proc. Sympos. Appl. Math., volume 15 (1963), 73-81.

Crossrefs

Formula

a(n) is asymptotically in between 3.2^n and 0.62^n n!. [McKay, McLeod, Wanless], [Cavenagh, Wanless]. - Ian Wanless, Jul 30 2010

Extensions

a(9) = 2241 from Brendan McKay and Ian Wanless, May 23 2004

A003111 Number of complete mappings of the cyclic group Z_{2n+1}.

Original entry on oeis.org

1, 1, 3, 19, 225, 3441, 79259, 2424195, 94471089, 4613520889, 275148653115, 19686730313955, 1664382756757625
Offset: 0

Views

Author

Keywords

Comments

A complete mapping of a cyclic group (Z_n,+) is a permutation f(x) of Z_n such that f(0)=0 and such that f(x)-x is also a permutation.
a(n)=TSQ(n)/n where TSQ(n) is the number of solutions of the toroidal semi-n-queen problem (A006717 is the sequence TSQ(2k-1)).
Stated another way, this is the number of "good" permutations on 2n+1 elements (see A006717) that start with 0. [Novakovich]. - N. J. A. Sloane, Feb 22 2011

Examples

			f(x)=2x in (Z_7,+) is a complete mapping of Z_7 since f(0)=0 and f(x)-x (=x) is also a permutation of Z_7.
		

References

  • Anthony B. Evans, Orthomorphism Graphs of Groups, vol. 1535 of Lecture Notes in Mathematics, Springer-Verlag, 1991.
  • Y. P. Shieh, Partition strategies for #P-complete problems with applications to enumerative combinatorics, PhD thesis, National Taiwan University, 2001.
  • Y. P. Shieh, J. Hsiang and D. F. Hsu, On the enumeration of Abelian k-complete mappings, Vol. 144 of Congressus Numerantium, 2000, pp. 67-88.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Formula

Suppose n is odd and let b(n)=a((n-1)/2). Then b(n) is odd; if n>3 and n is not 1 mod 3 then b(n) is divisible by 3; b(n)=-2 mod n in n is prime; b(n) is divisible by n if n is composite; b(n) is asymptotically in between 3.2^n and 0.62^n n!. [Cavenagh, Wanless], [McKay, McLeod, Wanless], [Stones, Wanless]. - Ian Wanless, Jul 30 2010
a(n) = A003109(n) + A003110(n). - Sean A. Irvine, Jan 30 2015
a(n) = A006609(2*n+2), n>0. - Sean A. Irvine, Jan 30 2015
From Vaclav Kotesovec, Jul 22 2023: (Start)
a(n) ~ exp(-1/2) * (2*n)!^2 / (2*n + 1)^(2*n - 1). [Eberhard, Manners, Mrazovic, 2016, Theorem 1.3, n->2*n+1]
a(n) ~ Pi * 2^(2*n + 3) * n^(2*n + 2) / exp(4*n + 3/2). (End)

Extensions

More terms from J. Hsiang, D. F. Hsu and Y. P. Shieh (arping(AT)turing.csie.ntu.edu.tw), Jun 03 2002
a(12) from Yuh-Pyng Shieh (arping(AT)gmail.com), Jan 10 2006

A342998 Minimum number of diagonal transversals in a cyclic diagonal Latin square of order 2n+1.

Original entry on oeis.org

1, 0, 5, 27, 0, 4523, 128818, 0, 204330233, 11232045257
Offset: 0

Views

Author

Eduard I. Vatutin, Apr 02 2021

Keywords

Comments

A cyclic Latin square is a Latin square in which row i is obtained by cyclically shifting row i-1 by d places (see A338562, A123565 and A341585).
Cyclic diagonal Latin squares do not exist for even orders.
a(n) <= A342997(n).
All cyclic diagonal Latin squares are diagonal Latin squares, so A287647(n) <= a((n-1)/2).

Examples

			For n=2 one of best cyclic diagonal Latin squares of order 5
  0 1 2 3 4
  2 3 4 0 1
  4 0 1 2 3
  1 2 3 4 0
  3 4 0 1 2
has a(2)=5 diagonal transversals:
  0 . . . .   . 1 . . .   . . 2 . .   . . . 3 .   . . . . 4
  . . 4 . .   . . . 0 .   . . . . 1   2 . . . .   . 3 . . .
  . . . . 3   4 . . . .   . 0 . . .   . . 1 . .   . . . 2 .
  . 2 . . .   . . 3 . .   . . . 4 .   . . . . 0   1 . . . .
  . . . 1 .   . . . . 2   3 . . . .   . 4 . . .   . . 0 . .
		

Crossrefs

A342997 Maximum number of diagonal transversals in a cyclic diagonal Latin square of order 2n+1.

Original entry on oeis.org

1, 0, 5, 27, 0, 4665, 131106, 0, 204995269, 11254190082
Offset: 0

Views

Author

Eduard I. Vatutin, Apr 02 2021

Keywords

Comments

A cyclic Latin square is a Latin square in which row i is obtained by cyclically shifting row i-1 by d places (see A338562, A123565 and A341585).
Cyclic diagonal Latin squares do not exist for even n.
All cyclic diagonal Latin squares are diagonal Latin squares, so a((n-1)/2) <= A287648(n).
All diagonal transversals are transversals, so a(n) <= A006717(n).
A342998 <= a(n).

Examples

			For n=2 one of the best cyclic diagonal Latin squares of order 5
  0 1 2 3 4
  2 3 4 0 1
  4 0 1 2 3
  1 2 3 4 0
  3 4 0 1 2
has a(2)=5 diagonal transversals:
  0 . . . .   . 1 . . .   . . 2 . .   . . . 3 .   . . . . 4
  . . 4 . .   . . . 0 .   . . . . 1   2 . . . .   . 3 . . .
  . . . . 3   4 . . . .   . 0 . . .   . . 1 . .   . . . 2 .
  . 2 . . .   . . 3 . .   . . . 4 .   . . . . 0   1 . . . .
  . . . 1 .   . . . . 2   3 . . . .   . 4 . . .   . . 0 . .
		

Crossrefs

A348212 Number of transversals in a cyclic diagonal Latin square of order 2n+1.

Original entry on oeis.org

1, 0, 15, 133, 0, 37851, 1030367, 0, 1606008513, 87656896891, 0, 452794797220965, 41609568918940625
Offset: 1

Views

Author

Eduard I. Vatutin, Oct 07 2021

Keywords

Comments

All cyclic diagonal Latin squares of order n have same number of transversals. A similar statement for diagonal transversals is not true (see A342998 and A342997).
All broken diagonals and antidiagonals of cyclic Latin squares are transversals, so a(n) >= 2*n for all n > 1 for which cyclic diagonal Latin squares exist. - Eduard I. Vatutin, Mar 22 2022
All cyclic diagonal Latin squares are diagonal Latin squares, so A287645(2n+1) <= a(n) <= A287644(2n+1) for all orders in which cyclic diagonal Latin squares exist. - Eduard I. Vatutin, Mar 23 2022

Examples

			A cyclic diagonal Latin square of order 5
  0 1 2 3 4
  2 3 4 0 1
  4 0 1 2 3
  1 2 3 4 0
  3 4 0 1 2
has a(3)=15 transversals:
  0 . . . .   0 . . . .   . 1 . . .         . . . . 4
  . 3 . . .   . . . . 1   2 . . . .         . 3 . . .
  . . 1 . .   . . . 2 .   . . . . 3         . . . 2 .
  . . . 4 .   . . 3 . .   . . . 4 .         1 . . . .
  . . . . 2   . 4 . . .   . . 0 . .   ...   . . 0 . .
		

Crossrefs

Formula

a(n) = A006717(n) * A011655(n+1).

A342372 Triangle T(n,k) of number of ways of arranging q nonattacking semi-queens on an n X n toroidal board, where 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 4, 0, 1, 9, 9, 3, 1, 16, 48, 32, 0, 1, 25, 150, 250, 75, 15, 1, 36, 360, 1200, 1224, 288, 0, 1, 49, 735, 4165, 8869, 6321, 931, 133, 1, 64, 1344, 11648, 43136, 64512, 33024, 4096, 0, 1, 81, 2268, 27972, 160866, 423306, 469800
Offset: 1

Views

Author

Walter Trump, Mar 09 2021

Keywords

Comments

T(0,0):=1 for combinatorial reasons.
A semi-queen can only move horizontal, vertical and parallel to the main diagonal of the board. Moves parallel to the secondary diagonal are not allowed.
Instead of a board on a torus, you can imagine that the semi-queens can leave a flat board on one side and re-enter the board on the other side.

Examples

			  1;
  1,  1;
  1,  4,   0;
  1,  9,   9,   3;
  1, 16,  48,  32,  0;
  1, 25, 150, 250, 75, 15;
		

Crossrefs

Formula

T(n,0) = 1.
T(n,1) = n^2.
T(n,2) = n^2*(n-1)*(n-2)/2.
T(n,3) = n^2*(n-1)*(n-2)*(n^2-6n+10)/6.
T(2n+1,2n+1) = A006717(n).
T(2n,2n) = 0.

A006204 Number of starters in cyclic group of order 2n+1.

Original entry on oeis.org

1, 1, 3, 9, 25, 133, 631, 3857, 25905, 188181, 1515283, 13376125, 128102625, 1317606101, 14534145947, 170922533545, 2138089212789
Offset: 1

Views

Author

Keywords

Comments

A complete mapping of a cyclic group (Z_m,+) is a permutation f(x) of Z_m with f(0)=0 such that f(x)-x is also a permutation. a(n) is the number of complete mappings f(x) of the cyclic group Z_{2n+1} such that f^(-1)=f.
In other words, a(n) is the number of complete mappings fixed under the reflection operator R, where R(f)=f^(-1). Reflection R is not only a symmetry operator of complete mappings, but also one of the (Toroidal)-(semi) N-Queen problems and of the strong complete mappings problem.

Examples

			f(x)=6x in (Z_7,+) is a complete mapping of Z_7 since f(0)=0 and f(x)-x (=5x) is also a permutation of Z_7. f^(-1)(x)=6x=f(x). So f(x) is fixed under reflection.
		

References

  • CRC Handbook of Combinatorial Designs, 1996, p. 469.
  • CRC Handbook of Combinatorial Designs, 2nd edition, 2007, p. 624.
  • J. D. Horton, Orthogonal starters in finite Abelian groups, Discrete Math., 79 (1989/1990), 265-278.
  • V. Linja-aho and Patric R. J. Östergård, Classification of starters, J. Combin. Math. Combin. Comput. 75 (2010), 153-159.
  • Y. P. Shieh, "Partition strategies for #P-complete problems with applications to enumerative combinatorics", PhD thesis, National Taiwan University, 2001.
  • Y. P. Shieh, J. Hsiang and D. F. Hsu, "On the enumeration of Abelian k-complete mappings", vol. 144 of Congressus Numerantium, 2000, pp. 67-88.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Extensions

Additional comments and one more term from J. Hsiang, D. F. Hsu and Y. P. Shieh (arping(AT)turing.csie.ntu.edu.tw), Jun 03 2002
Corrected and extended by Roland Bacher, Dec 18 2007
Extended by Vesa Linja-aho (vesa.linja-aho(AT)tkk.fi), May 06 2009

A024915 Number of positions in which 2n semi-queens may be placed on an 2n X 2n toroidal board, with only one semi-queen attacking another semi-queen; also, number of interval method wirings for a cryptographic rotor of size 2n.

Original entry on oeis.org

2, 16, 144, 2048, 46400, 1262592, 44493568, 2000420864, 110023308288
Offset: 1

Views

Author

John Savard (jsavard(AT)ecn.ab.ca)

Keywords

Examples

			There are 144 possible interval method wirings for a 6-contact rotor, based on 36 rotations of both the whole rotor or one side of the rotor, starting from the four sequences: (1,2,4,6,3,5), (1,2,5,6,3,4), (1,4,3,2,6,5) and (1,6,3,5,4,2), having respectively the patterns of intervals (0,0,1,2,4,5), (0,0,2,5,1,4), (0,2,0,4,1,5) and (0,4,0,1,5,2).
		

Crossrefs

Cf. A006717.

Extensions

Entry revised and a(9) from Sean A. Irvine, Jul 28 2019

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