MathDB
numbers 1 to n^2 in a nxn board, prison break 4

Source: 2015 VMEO IV Juniors 10.4 Vietnamese Mathematics e - Olympiad https://artofproblemsolving.com/community/c2463156_2015_vmeo_iv

September 15, 2021
combinatorics

Problem Statement

In the movie ”Prison break 44”. Michael Scofield has to break into The Company. There, he encountered a kind of code to protect Scylla from being taken away. This code require picking out every number in a 2015×20152015\times 2015 grid satisfying: i) The number right above of this number is 1mod2\equiv 1 \mod 2 ii) The number right on the right of this number is 2mod3\equiv 2 \mod 3 iii) The number right below of this number is 3mod4\equiv 3 \mod 4 iv) The number right on the right of this number is 4mod5\equiv 4 \mod 5 . How many number does Schofield have to choose? Also, in a n×nn\times n grid, the numbers from 1 1 to n2n^2 are arranged in the following way : On the first row, the numbers are written in an ascending order 1,2,3,4,...,n1, 2, 3, 4, ..., n, each cell has one number. On the second row, the number are written in descending order 2n,2n1,2n2,...,n+12n, 2n -1, 2n- 2, ..., n + 1. On the third row, it is ascending order again 2n+1,2n+2,...,3n2n + 1, 2n + 2, ..., 3n. The numbers are written like that until nnth row. For example, this is how a 33 ×\times 33 board looks like:https://cdn.artofproblemsolving.com/attachments/8/7/0a5c8aba6543fd94fd24ae4b9a30ef8a32d3bd.png