%I #29 Aug 09 2016 07:36:16
%S 20,6,3,8,3,2,6,5,5,4,0,1,3,1,3,6,5,0,5,3,6,2,1,3,1,1,1,6,11,7,4,3,9,
%T 3,3,2,3,2,2,7,7,0,5,1,1,0,0,0,1,3,2,0,1,2,2,1,1,1,0,0,0,0,0,0,1,0,3,
%U 2,1,2,0,1,1,3,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,2,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,2,0,0,1
%N White to move: Number of up to 5 man GBR-codes on an 8x8 chessboard having longest checkmate under perfect play in n moves if any such checkmate exists.
%C Numbers and examples derived from Kryukov-link.
%C Longest 3 man mate is King and Pawn vs. King (GBR code 0000.10) in 28, with FEN 8/8/8/1k6/8/8/K5P1/8 w - - 0 1.
%C Longest 4 man mate is King and Pawn vs. King and rook (GBR code 0300.10) in 43, with FEN 8/5k2/2PK4/5r2/8/8/8/8 w - - 0 1
%C Longest 5 man mate is King and 2 Pawns vs. King and Pawn in 127 (GBR code 0000.12), with 8/8/8/8/1p2P3/4P3/1k6/3K4 w - - 0 1. As the sequence is up to 5 man, this makes 127 the length of the sequence.
%C For some particular material counted, it needn't be a guaranteed win under perfect play. For example King and Knight vs King and Knight (GBR code 0004) generally is a draw, but a forced checkmate in one exists (FEN 8/8/8/8/8/8/n1K5/k1N5 w - - 0 1).
%C The listed examples, or more generally up to 6 man positions can be examined using the k4it link.
%C After n = 127, all terms are 0 so the sequence ends at n = 127.
%H k4it, <a href="http://www.k4it.de/?topic=egtb&lang=en">All 6-men tables online (except 5 vs. 1).</a>
%H K. Kryukov, <a href="http://kirill-kryukov.com/chess/longest-checkmates/longest-checkmates.shtml">Longest checkmates</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/GBR_code">GBR code</a>
%e a(2) = 6 because there are 6 positions in which the longest checkmate under perfect play with (at most) 5 man is in two moves. The six configurations are: KBKQB, KBKQP, KBKRB, KBKRP, KBKBB and KBKBN.
%K nonn,fini,full
%O 1,1
%A _David A. Corneth_, Jul 02 2016