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.

Previous Showing 11-17 of 17 results.

A136257 Number of possible plays on the n-th move in Mirror Chess in which Black's play is always the mirror image of White (White must either mate or play such that Black can mirror the move).

Original entry on oeis.org

1, 20, 437, 10461, 270726, 7456194, 215666696, 6485151199, 201183083017, 6401210746834, 207969967925893, 6875935591529309
Offset: 0

Views

Author

Jeremy Gardiner, Apr 18 2008

Keywords

Comments

By the number of possible plays on the n-th move is meant the total number of legal lines of play for white under the rules of mirror chess at a depth of n moves from the standard initial position.
If white cannot play a legal move under the rules of mirror chess then the game is considered to be a draw.
Among the 270726 possibilities up to move 4, only 3 correspond to games ending in checkmate, all at move 4: see examples. - M. F. Hasler, Dec 08 2021

Examples

			From _M. F. Hasler_, Jul 05 2025: (Start)
a(1) = 20 because White can make any of the 20 possible starting moves, to each of which Black can reply with the "same" (mirror) move.
Then, depending on the starting move, there are between 19 (for 1. a3, f3, f4 and h3) and 30 (for 1. e3) possible moves, for a total of a(2) = 437 moves (for each of which Black can reply with the "same" move).
At move 3, there is a total of 48 moves that are legal but not mirror-legal:
- After 1.c4: 2.d3 (or d4) 3.Qa4+, 2.d3 3.Qa4+, 2.Qb3 3.Qb5 (or Qxb6), and 2.Qa4 3.Qxa5 (or Qxd7+).
- After 1.d4: 2.c4 3.Qa4+, 2.e3 (or e4) 3.Bb5+, and 2.Qd3 3.Qb5+.
- Similarly after 1.c3 and 1.d3, and 20 more with 1.e3 or 1.e4.
- After 1.f4: 2.e3 3.Qh5+ and 2.e4 3.Qh5+, and after 1.g3: 2.Bh3 3.Bxd7+.
- Finally, there are also 9 sequences of only knight moves that end in a check, like 1.Nc3 2.Ne4 3.Nd6+ (or Nf6+). (End)
A checkmate cannot occur earlier than at move 4, where we have the following possibilities: 1.d4 d5 2.Qd3 Qd6 3.Qf5 Qf4 4.Qxc8# or 3.Qh3 Qh6 4.Qxc8#, and
  1.c4 c5 2.Qa4 Qa5 3.Qc6 Qc3 4.Qxc8#, corresponding to the following diagrams:
        r n Q . k b n r        r n Q . k b n r        r n Q . k b n r
        p p p . p p p p        p p p . p p p p        p p . p p p p p
        . . . . . . . .        . . . . . . . q        . . . . . . . .
        . . . p . . . .        . . . p . . . .        . . p . . . . .
        . . . P . q . .        . . . P . . . .        . . P . . . . .
        . . . . . . . .        . . . . . . . .        . . q . . . . .
        P P P . P P P P        P P P . P P P P        P P . P P P P P
        R N B . K B N R        R N B . K B N R        R N B . K B N R
where upper/lowercase letters represent white/black pieces, and dots stand for empty squares. - _M. F. Hasler_, Dec 08 2021
		

Crossrefs

Cf. A048987.

Programs

  • Python
    import chess
    def A136257(n, B=chess.Board()):
        if n == 0: return 1
        count = 0
        for m in B.legal_moves:
            B.push(m)
            if not B.is_checkmate():
                m.from_square ^= 56
                m.to_square ^= 56  # reverse ranks through XOR with 7
                if B.is_legal(m):
                    if n == 1: count += 1
                    else:
                        B.push(m)
                        count += A136257(n - 1, B)
                        B.pop()
            elif n == 1: count += 1
            B.pop()
        return count  # M. F. Hasler, Dec 08 2021

Extensions

a(2) corrected and a(3) from Jeremy Gardiner, Mar 03 2013
a(3) corrected and a(4)-a(11) from François Labelle, Apr 12 2015

A089956 Number of chess games that end in check (but not checkmate) after exactly n plies.

Original entry on oeis.org

0, 0, 0, 12, 461, 27004, 798271, 32668081, 959129557, 35695709940, 1078854669486, 39147687661803, 1224448528652016, 44252532348552226
Offset: 0

Views

Author

François Labelle, Jan 12 2004

Keywords

Crossrefs

Extensions

a(11) from François Labelle, Jul 25 2004, who thanks Joost de Heer for providing computer time.
a(12) from François Labelle, Mar 04 2012
a(13) from François Labelle, Aug 15 2017

A157851 Number of possible Fischer Random Chess games at the end of the n-th ply.

Original entry on oeis.org

960, 18882, 371766, 8224968, 181106056, 4433048830, 107637760217, 2854198413886, 75006431287937
Offset: 0

Views

Author

Johannes W. Meijer & Richard Pijl (richard.pijl(AT)telenet.be), Mar 07 2009, Feb 25 2010

Keywords

Comments

Fischer Random Chess is also called Chess960 because the number of different initial positions is 960.
The number of possible games at the end of the n-th ply is the sum of all possible games on all 960 boards with a different initial position.
The number of possible first moves for white depends on the following three factors:
a) The eight pawns.
b) The positions of the two knights. If they are on a1 and/or h1 the number of possible moves reduces from 20 to 18 or 19. On the 960 boards there are 240 boards with a knight on a1. Looking more closely at the positions of the second knight on these 240 boards reveals that 36 knights can be found on b1, d1, f1 and h1 and 32 knights can be found on c1, e1 and g1, something that can be proved with some simple combinatorics.
c) The possibility of castling. On the 960 boards there are 72 boards with a king on d1 and a rook on c1 and there are 90 boards with a king on f1 and a rook on g1. Both positions allow castling under the Fischer Random Chess rules.
These three factors lead to the following partition of the 960 boards (K = King; R = Rook; N = Knight; NoN = No Knight; NoC = No castling allowed): 454 (NoNa1+NoNh1+NoC), 162 (Na1+NoNh1+NoC), 160 (Nh1+NoNa1+NoC), 34 (NoNa1+NoNh1+Kf1+Rg1), 28 (NoNa1+NoNh1+Kd1+Rc1), 28 (Nh1+NoNa1+Kf1+Rg1), 22 (Na1+Nh1+NoC), 22 (Na1+NoNh1+Kd1+Rc1), 20 (Na1+NoNh1+Kf1+Rg1), 16 (Nh1+NoNa1+Kd1+Rc1), 8 (Na1+Nh1+Kf1+Rg1), 6 (Na1+Nh1+Kd1+Rc1).
The first three terms of the sequence can be calculated in a straightforward way, see the examples. The values of a(1) and a(2) were confirmed by Richard Pijl with his Fischer Random Chess playing chess engine The Baron, see the links. He also determined the values of a(3), a(4) and a(5).
The Baron 3.41 now gives different values for a(3)-a(6), confirmed by my own chess engine. - François Labelle, Dec 05 2017

Examples

			a(0) = 4 (Bishop) * 4 (Bishop) * 6 (Queen) * 10 (Knights) * 1 (King and Rooks) = 960.
a(1) = 36*18 + 204*19 + 204*19 + 516*20 + 90 + 72 = 18882.
a(2) = 22*18^2 + (162+160+8+6)*19^2 + (454+28+22+20+16)*20^2 + (34+28)*21^2 = 371766.
		

Crossrefs

Cf. Chess: A006494, A048987, A079485.
Cf. Go: A007565, A048289.
Cf. Checkers: A133046, A133047.

Programs

  • Python
    import chess
    def A157851(n, b = None): return (b.legal_moves.count() if b else 960) if not n else sum(b.push(m) or A157851(n-1, b)+(not b.pop()) for m in b.legal_moves) if b else sum(A157851(n-1, chess.Board.from_chess960_pos(s)) for s in range(960)) # (For illustration, slow for n > 3.) - M. F. Hasler, Apr 25 2023

Extensions

Corrected and edited by Johannes W. Meijer, Feb 25 2010, Mar 03 2010
a(6) added by Richard Pijl (richard.pijl(AT)telenet.be). - Johannes W. Meijer, May 29 2010
a(3)-a(6) corrected by François Labelle, Dec 05 2017
a(7)-a(8) from François Labelle, Jan 18 2018

A007545 Number of chess games with n plies (another version).

Original entry on oeis.org

1, 20, 400, 8902, 197742, 4897256, 120921506, 3284294545, 88867026005
Offset: 0

Views

Author

Ken Thompson (ken(AT)google.com)

Keywords

Comments

Up to a(6) this is the number of chess games with all legality constraints removed, even allowing the king to be captured. (This differs from the number of positions in suicide chess, as suicide chess contains compulsory captures.) - Richard Bean, Jun 18 2003

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Extensions

I am not sure of the precise rules that were used to compute these numbers. A006494 and A048987 are the preferred versions of this sequence. - N. J. A. Sloane.

A007577 Number of chess games with n plies (another version).

Original entry on oeis.org

1, 20, 400, 8902, 197281, 4865577, 119057155, 3194833218
Offset: 0

Views

Author

Johan Boye (jb(AT)sectra.se)

Keywords

Crossrefs

Cf. A048987.

Extensions

I am not sure of the precise rules that were used to compute these numbers. A048987 is the preferred version of this sequence. - N. J. A. Sloane.

A318266 Number of legal chess positions with a total of n black and white pieces, reduced for symmetry.

Original entry on oeis.org

462, 368079, 125246598, 25912594054, 3787154440416, 423836835667331, 38176306877748245
Offset: 2

Views

Author

Cyril Banderier, Aug 22 2018

Keywords

Comments

a(n) is the number of legal chess positions with n pieces on the board.
See Kirill Kryukov's webpage (in the Links section) for the explanations of these computations and of symmetries taken into account to avoid double counting, and for the definition of "legal" position. Note that some "legal" positions are not reachable in a game: e.g., white Ka1 vs. black Kc3 + Qc2 + Qb3 (black to move) is counted in a(4), although it is impossible to reach such a position.
The rapid growth of this sequence illustrates why exhaustive endgame databases at chess quickly require several hundred terabytes, even with a small number of pieces on the board.

Examples

			There are 3612 ways to place 2 kings on a chessbard so that they are not in check, which would not be a legal position: this decomposes as 3612 = 4*(64-4) [when white king is in a corner] + 6*4*(64-6) [when white king is on a side] + (64-28)*(64-9) [when white king is not touching any side of the board]. Killing "isomorphic" positions due to symmetries reduces this number to 462 remaining different positions. Symmetries roughly lead to a division by 8, but not exactly, because they have some fixed points (e.g., the position with kings on A1 and H8 is a fixed point for the diagonal symmetry). Therefore a(2)=462.
		

Crossrefs

Cf. A048987 for another enumeration of chess positions.

A366476 Number of possible chmess games at the end of the n-th ply.

Original entry on oeis.org

1, 25, 625
Offset: 0

Views

Author

N. J. A. Sloane, Oct 26 2023

Keywords

Comments

Chmess is an imaginary game very similar to chess, with the exception that the king can move two squares in any direction instead of just one. To get a(1) = 25 I am assuming the king can jump over an occupied square, but is not allowed to move out and back (which would give a(1) = 26).

References

  • Daniel C. Dennett, Higher-order truths about chmess, Topoi 25 (1-2):39-41 (2006).
  • Nigel Warburton, Review of "I've Been Thinking" by Daniel C. Dennett (Allen Lane, 2023), TLS #6290 (Oct 20, 2023), pp. 8-9.

Crossrefs

Previous Showing 11-17 of 17 results.