OFFSET
1,1
COMMENTS
For each of the 216 possible checkmate positions with K, R and k on one of the squares numbered from 0 to 63, the sequence lists the value 2^K + 2^R + 2^k, see examples.
With the usual rules of chess, this allows the unique determination of the square on which each piece is located, except for one single exception where the black king is in the corner and the white K & R are both at the distance of one (empty) square from it, also on the border: the position where K & R change places has the same bitmap. Therefore we list this value twice, a(1) = a(2) = 2^0 + 2^2 + 2^16 = 65541, and we do the same for the three values corresponding to the equivalent position in the other corners.
LINKS
EXAMPLE
The first term, a(1) = 2^0 + 2^2 + 2^16 = 65541, corresponds to the following position (omitting the first 4 empty ranks = rows):
........
K.......
........
k.R.....
where the black king "k" is in the corner on square a1 numbered 0, the white rook "R" is giving check from square c1 numbered 2, and the white king "K" is on square a3 numbered 16.
This is the only bitmap (up to 4-fold symmetry) that is ambiguous in that it represents two distinct positions: The white king and rook can exchange places, which yields a different checkmate position with the same bitmap. Therefore this term is listed twice, also as a(2). (The duplication of just the initial term (which is the only duplicate among the displayed data) does not affect the search results negatively, in case anyone searches for the sequence without duplicates.)
The next term, a(3) = 65545 = 2^0 + 2^3 + 2^16, corresponds to the position where the rook "R" is one square farther to the right (on square d1 numbered 3). There is no ambiguity here, for an exchange of "R" and "K", or any other two or three pieces on the same three squares, would not be a checkmate position.
PROG
(PARI) /* helper functions */ SYM(S, ROT=concat(Vecrev(matrix(8, , i, j, 2^(i*8+j-9)))))=concat([ S=if(k, TRANS(S, ROT), concat(S, TRANS(S)))| k<-[0..3]])
TRANS(S, FLIP=[2^(k+7-k%8*2) | k<-[0..31]])=[vecsum(vecextract(FLIP, p)) | p<-S]
A362950=vecsort( SYM( concat([ [1+2^R+2^16 | R<-[2..7]] , [1+2^R+2^17 | R<-[2..7]], [2+2^R+2^17 | R<-[3..7]], concat([[ (1+2^16)<<K+2^R | R<- [0..7], abs(R-K)>1] | K <- [2..3] ]) ])))
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
M. F. Hasler, Jun 13 2023
STATUS
approved