MathDB
Numbers in black and white squares are in a specific ratio

Source: 2021 2nd OMpD L3 P4 - Brazil - Olimphída Matemáticos por Diversão

July 8, 2023
checkerboardcombinatoricsratio

Problem Statement

Determine the smallest positive integer nn with the following property: on a board n×nn \times n, whose squares are painted in checkerboard pattern (that is, for any two squares with a common edge, one of them is black and the other is white), it is possible to place the numbers 1,2,3,...,n21,2,3 , ... , n^2, a number in each square, so if BB is the sum of the numbers written in the white squares and PP is the sum of the numbers written in the black squares, then BP=20214321\frac {B}{P} = \frac{2021}{4321}.