MathLabs

Problem 2

Consider a 100×100100\times100 table, and identify the cell in row aa and column bb, 1≤a,b≤1001\le a,b\le100, with the ordered pair (a,b)(a,b). Let kk be an integer such that 51≤k≤9951\le k\le99. A kk-knight is a piece that moves one cell vertically or horizontally and kk cells in the other direction; that is, it moves from (a,b)(a,b) to (c,d)(c,d) such that (∣a−c∣,∣b−d∣)(|a-c|,|b-d|) is either (1,k)(1,k) or (k,1)(k,1). The kk-knight starts at cell (1,1)(1,1) and performs several moves. A sequence of moves is a sequence of cells (x0,y0)=(1,1),(x1,y1),…,(xn,yn)(x_0,y_0)=(1,1),(x_1,y_1),\ldots,(x_n,y_n) such that, for all i=1,2,…,ni=1,2,\ldots,n, 1≤xi,yi≤1001\le x_i,y_i\le100 and the kk-knight can move from (xi−1,yi−1)(x_{i-1},y_{i-1}) to (xi,yi)(x_i,y_i). In this case each cell (xi,yi)(x_i,y_i) is said to be reachable. For each kk, find L(k)L(k), the number of reachable cells.
Step 3 of 5: Two moves slide a cell by 2
(x,y)→(x±k,y−1)→(x,y−2)(x,y)\to(x\pm k,y-1)\to(x,y-2)
Detailed analysis

For cells (x,y)(x,y) and (x,y−2)(x,y-2) both outside SS, one of the two-move paths (x,y)→(x+k,y−1)→(x,y−2)(x,y)\to(x+k,y-1)\to(x,y-2) or (x,y)→(x−k,y−1)→(x,y−2)(x,y)\to(x-k,y-1)\to(x,y-2) stays on the board, since x≤100−kx\le100-k or x≥k+1x\ge k+1 lets us pick the sign of the kk-jump; symmetrically, (x,y)(x,y) and (x−2,y)(x-2,y) are joined by a two-move path that swaps the roles of the coordinates.