MathDB
1-9 into 3x3 board, difference of digits in cells that share a side is <=3

Source: 2019 Chile National Olympiad level 2 p1

October 22, 2022
combinatorics

Problem Statement

A square of 3×33 \times 3 is subdivided into 9 small squares of 1×11 \times 1. It is desired to distribute the nine digits 1,2,...,91, 2, . . . , 9 in each small square of 1×11 \times 1, a number in each small square. Find the number of different distributions that can be formed in such a way that the difference of the digits in cells that share a side in common is less than or equal to three. Two distributions are distinct even if they differ by rotation and/or reflection.