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

A260189 a(n) = A033148(n) / 2^floor(n/4).

Original entry on oeis.org

1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 4, 8, 0, 0, 15, 22, 0, 0, 52, 51, 0, 0, 257, 342, 0, 0, 1589, 2609, 0, 0, 11417, 16896, 0, 0, 75375, 99114, 0, 0, 616010, 876579, 0, 0, 5253278, 8551800, 0, 0, 49667373, 79595269, 0, 0, 525731268, 764804085, 0, 0, 5932910966, 8905825760, 0, 0
Offset: 1

Views

Author

Vaclav Kotesovec, following a suggestion of Don Knuth, Jul 18 2015

Keywords

References

  • W. Ahrens, Mathematische Unterhaltungen und Spiele, 2nd edition, volume 1, Teubner, 1910, pages 249-258.
  • Maurice Kraitchik, Le probleme des reines, Bruxelles: L'Échiquier, 1926, 18.

Crossrefs

A002562 Number of ways of placing n nonattacking queens on n X n board (symmetric solutions count only once).

Original entry on oeis.org

1, 0, 0, 1, 2, 1, 6, 12, 46, 92, 341, 1787, 9233, 45752, 285053, 1846955, 11977939, 83263591, 621012754, 4878666808, 39333324973, 336376244042, 3029242658210, 28439272956934, 275986683743434, 2789712466510289, 29363495934315694
Offset: 1

Views

Author

Keywords

Examples

			a(4) = 1:
  +---------+
  | . . Q . |
  | Q . . . |
  | . . . Q |
  | . Q . . |
  +---------+
a(5) = 2:
  +-----------+ +-----------+
  | . . . Q . | | . . . Q . |
  | . Q . . . | | Q . . . . |
  | . . . . Q | | . . Q . . |
  | . . Q . . | | . . . . Q |
  | Q . . . . | | . Q . . . |
  +-----------+ +-----------+
a(6) = 1:
  +-------------+
  | . . . . Q . |
  | . . Q . . . |
  | Q . . . . . |
  | . . . . . Q |
  | . . . Q . . |
  | . Q . . . . | - _Hugo Pfoertner_, Mar 17 2019
  +-------------+
a(7) = 6:
  +---------------+  +---------------+  +---------------+
  | 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 . . |
  +---------------+  +---------------+  +---------------+
- _Hugo Pfoertner_, Mar 18 2019
		

References

  • Martin Gardner, Fractal Music, Hypercards and More, Freeman, NY, 1991, p. 231-233.
  • 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).
  • M. B. Wells, Elements of Combinatorial Computing. Pergamon, Oxford, 1971, p. 238.

Crossrefs

Formula

a(n) = (1/8) * (Q(n) + P(n) + 2 * R(n)), where Q(n) = A000170(n) [all solutions], P(n) = A032522(n) [point symmetric solutions] and R(n) = A033148(n) [rotationally symmetric solutions].

Extensions

a(17) and a(18) found by Ulrich Schimke in Goettingen, Germany (UlrSchimke(AT)aol.com)
Formula and a(19) to a(23) added by Matthias Engelhardt in Nuremberg, Germany, Jan 23 2000
Terms (calculated from formula) added by Thomas B. Preußer, Dec 15 2008
a(26) (derived from formula after recent extension of A000170) added by Thomas B. Preußer, Jul 12 2009
a(27) (derived from formula after recent extension of A000170) added by Thomas B. Preußer, Sep 23 2016

A037223 Number of solutions to non-attacking rooks problem on n X n board that are invariant under 180-degree rotation.

Original entry on oeis.org

1, 1, 2, 2, 8, 8, 48, 48, 384, 384, 3840, 3840, 46080, 46080, 645120, 645120, 10321920, 10321920, 185794560, 185794560, 3715891200, 3715891200, 81749606400, 81749606400, 1961990553600, 1961990553600, 51011754393600, 51011754393600, 1428329123020800, 1428329123020800
Offset: 0

Views

Author

Miklos SZABO (mike(AT)ludens.elte.hu)

Keywords

Comments

This is just A000165 doubled up. Normally such sequences do not get their own entry in the OEIS. This is an exception. - N. J. A. Sloane, Sep 23 2006
Also the number of permutations of (1,2,3,...,n) for which the reverse of the inverse is the same as the inverse of the reverse. - Ian Duff, Mar 09 2007
Conjecture: a(n) = Product_{1<=i<=n and phi(i)<=floor(i/2)}i. - Enrique Pérez Herrero, May 31 2012. This conjecture is WRONG, counterexample is n=105. [Vaclav Kotesovec, Sep 07 2012]

References

  • E. Lucas, Theorie des nombres, Gauthiers-Villars, Paris, 1891, Vol 1, p. 221.

Crossrefs

Programs

  • Magma
    [Factorial((n div 2) -1)*2^((n div 2)-1): n   in [2..35]]; // Vincenzo Librandi, Nov 17 2018
  • Maple
    For Maple program see A000903.
    # second Maple program:
    a:= n-> (r-> r!*2^r)(iquo(n, 2)):
    seq(a(n), n=0..30);  # Alois P. Heinz, Dec 23 2013
  • Mathematica
    f[n_]:=Times@@Select[Range[n],EulerPhi[#]<=Floor[#/2]&]; Table[f[n],{n,1,30}] (* Conjectured: Enrique Pérez Herrero, May 31 2012 *)(* This conjecture and also program is WRONG for n=105, Vaclav Kotesovec, Sep 07 2012 *)
    a[n_] := (2*Floor[n/2])!!; Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Dec 23 2013, after N. J. A. Sloane's comment *)

Formula

a(2n) = a(2n+1) = n!*2^n.
E.g.f.: 1 + x + (1 + x + x^2)*exp(x^2/2)*sqrt(Pi/2)*erf(x/sqrt(2)), where erf denotes the error function. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 01 2002
For asymptotics see the Robinson paper.
E.g.f.: Q(0) where Q(k)= 1 + x/(2*k + 1 - x*(2*k+1)/(x+1/Q(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Sep 21 2012
E.g.f.: 1/(W(0)-x) where W(k)= x + 1/(1 + x/(2*k + 1 - x*(2*k+1)/W(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Sep 22 2012
a(n) = Product_{i=1..floor(n/2)} 2*i. - Wesley Ivan Hurt, Oct 19 2014
D-finite with recurrence: a(n) +a(n-1) -n*a(n-2) +(-n+2)*a(n-3)=0. - R. J. Mathar, Feb 20 2020

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 01 2002
Edited by N. J. A. Sloane, Sep 23 2006

A037224 Number of permutations p of {1,2,3...,n} that are fixed points under the operation of first reversing p, then taking the inverse.

Original entry on oeis.org

1, 0, 0, 2, 2, 0, 0, 12, 12, 0, 0, 120, 120, 0, 0, 1680, 1680, 0, 0, 30240, 30240, 0, 0, 665280, 665280, 0, 0, 17297280, 17297280, 0, 0, 518918400, 518918400, 0, 0, 17643225600, 17643225600, 0, 0, 670442572800, 670442572800, 0, 0, 28158588057600
Offset: 1

Views

Author

Miklos SZABO (mike(AT)ludens.elte.hu)

Keywords

Comments

A122670 is an essentially identical sequence.
Also the number of rotationally symmetric solutions to non-attacking rooks problem on an n X n board.
Reversal of a permutation reflects the associated permutation matrix through an axis parallel to its sides, while inversion reflects the matrix through its main diagonal. The composition of these two operations is rotation by 90 degrees, and so permutations fixed by this composition correspond to rotationally symmetric rook diagrams by taking the associated permutation matrix. [Ian Duff, Mar 09 2007 and Joel B. Lewis, Jun 10 2009]
Equivalently, the number of permutations fixed by first inverting and then reversing. We may also replace "reversing" with "complementing" in the preceding sentences, where the complement of (w(1), ..., w(n)) is (n + 1 - w(1), ..., n + 1 - w(n)). [Joel B. Lewis, Jun 10 2009]

Examples

			Let p be the permutation {11,1,9,3,7,5,8,6,10,4,12,2} of {1,2,3,..,12}. Then the reverse Rp of p is {2,12,4,10,6,8,5,7,3,9,1,11} and the inverse IRp of Rp is {11,1,9,3,7,5,8,6,10,4,12,2}. Thus p counts as one of the a(12)=120 fixed-points for n=12.
		

Crossrefs

Programs

  • Maple
    a:= n-> `if`(irem(n, 4, 'm')>1, 0,
            `if`(m=0, 1, (2*m-1)! * 2/(m-1)!)):
    seq(a(n), n=1..99);  # Alois P. Heinz, Jan 21 2011
  • Mathematica
    {1}~Join~Table[If[MemberQ[{0, 1}, Mod[n, 4]], (2 # - 1)!*2/(# - 1)! &[Floor[n/4]], 0], {n, 2, 44}] (* Michael De Vlieger, Oct 05 2016 *)
  • PARI
    a(n)=
    {
        if ( n%4>=2, return(0) );
        n = n\4;
        if ( n==0, return(1) );
        return( (2*n-1)!*2/(n-1)! );
    }
    vector(55,n,a(n)) /* Joerg Arndt, Jan 21 2011 */

Formula

a(4n) = a(4n+1) = (2n-1)!*2/(n-1)!, a(4n+2) = a(4n+3) = 0.

Extensions

Edited by N. J. A. Sloane, Jun 12 2009, incorporating comments from John W. Layman, Sep 17 2004

A032522 Number of point symmetric solutions to non-attacking queens problem on n X n board.

Original entry on oeis.org

1, 0, 0, 2, 2, 4, 8, 4, 16, 12, 48, 80, 136, 420, 1240, 3000, 8152, 18104, 44184, 144620, 375664, 1250692, 3581240, 11675080, 34132592, 115718268, 320403024, 1250901440, 3600075088, 14589438024, 43266334696, 181254386312
Offset: 1

Views

Author

Miklos SZABO (mike(AT)ludens.elte.hu)

Keywords

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).
  • 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.

Crossrefs

Extensions

More terms for n = 33..36 from W. Schubert, Jul 31 2009

A260318 Number of doubly symmetric characteristic solutions to the n-queens problem.

Original entry on oeis.org

1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 32, 64, 0, 0, 240, 352, 0, 0, 1664, 1632, 0, 0, 16448, 21888, 0, 0, 203392, 333952, 0, 0, 2922752, 4325376, 0, 0, 38592000, 50746368, 0, 0, 630794240, 897616896, 0, 0, 10758713344, 17514086400, 0, 0, 203437559808, 326022221824, 0, 0, 4306790547456, 6265275064320, 0, 0, 97204813266944, 145913049251840, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, Jul 22 2015

Keywords

Comments

The problem of placing eight queens on a chessboard so that no one of them can take any other in a single move is a particular case of the more general problem: On a square array of n X n cells place n objects, one on each of n different cells, in such a way that no two of them lie on the same row, column, or diagonal.
There are no (interesting) doubly centrosymmetric solutions for n < 4, and there is just one complete set for n = 4: 2413, 3142 and one for n = 5: 25314, 41352.
On the ordinary chessboard of 8 X 8 cells there are a total of 92 solutions, consisting of 11 sets of equivalent ordinary solutions and one set of equivalent symmetric solutions. There are no doubly symmetric solutions in this case.

References

  • Maurice Kraitchik: Mathematical Recreations. Mineola, NY: Dover, 2nd ed. 1953, pp. 247-255 (The Problem of the Queens).

Crossrefs

Formula

a(n) = A033148(n) / 2 for n >= 2. - Don Knuth, Jun 20 2017

Extensions

More terms, due to Don Knuth, added by Colin Barker, Jun 20 2017

A383738 Number of solutions to the n-queens puzzle in a n X n board that are not square root permutations of {n-1,...,2,1,0}.

Original entry on oeis.org

0, 0, 0, 0, 8, 4, 40, 92, 352, 724, 2680, 14192, 73704, 365596, 2279184, 14772448, 95814976, 666090624, 4968057848, 39029188404, 314666222008, 2691008701644, 24233937684440, 227514171970408, 2207893435805088, 22317699616364044, 234907967154122528
Offset: 1

Views

Author

Darío Clavijo, May 07 2025

Keywords

Comments

Each solution to the n-queens problem can be represented as a permutation of {0,1,2,...,n-1}.
Conversely, the number of solutions to the n-queens puzzle in a n X n board that are also square root permutations of {n-1,...,2,1,0} is A033148.
a(n) is always even because every solution to the puzzle has its own reflection in the horizontal axis, e.g., {0,2,4,1,3} and {3,1,4,2,0}.

Examples

			For n = 5, we have:
     0 1 2 3 4      0 1 2 3 4      0 1 2 3 4      0 1 2 3 4      0 1 2 3 4
   +-----------+  +-----------+  +-----------+  +-----------+  +-----------+
 0 | Q         |  | Q         |  |   Q       |  |   Q       |  |     Q     |
 1 |     Q     |  |       Q   |  |       Q   |  |         Q |  | Q         |
 2 |         Q |  |   Q       |  | Q         |  |     Q     |  |       Q   |
 3 |   Q       |  |         Q |  |     Q     |  | Q      Q  |  |   Q       |
 4 |      Q    |  |     Q     |  |         Q |  |           |  |         Q |
   +-----------+  +-----------+  +-----------+  +-----------+  +-----------+
     0,2,4,1,3      0,3,1,4,2      1,3,0,2,4      1,4,2,0,3      2,0,3,1,4
is sqrt perm: no             no           no            yes              no
     0 1 2 3 4      0 1 2 3 4      0 1 2 3 4      0 1 2 3 4      0 1 2 3 4
   +-----------+  +-----------+  +-----------+  +-----------+  +-----------+
 0 |     Q     |  |       Q   |  |       Q   |  |         Q |  |         Q |
 1 |         Q |  | Q         |  |   Q       |  |   Q       |  |     Q     |
 2 |   Q       |  |     Q     |  |         Q |  |       Q   |  | Q         |
 3 |       Q   |  |         Q |  |     Q     |  | Q         |  |       Q   |
 4 | Q         |  |   Q       |  | Q         |  |     Q     |  |   Q       |
   +-----------+  +-----------+  +-----------+  +-----------+  +-----------+
    2,4,1,3,0      3,0,2,4,1       3,1,4,2,0      4,1,3,0,2      4,2,0,3,1
is sqrt perm: no            yes           no            no              no
In total there are 10 solutions for a 5 X 5 board with 5 queens, of which 8 are not square root permutations of {n-1,...,2,1,0}.
Then, a(5) = 10.
		

Crossrefs

Formula

a(n) = A000170(n) - A033148(n).
Showing 1-7 of 7 results.