Maths Olympiad Prep

Track / Stage 6 / 331 of 400 #1331 of 1964

Problem 1331

National olympiad, first round
Number theory Difficulty 6.7 Find the answer

Farmer John has a 47×5347 \times 53 rectangular square grid. He labels the first row 1,2,,471, 2, \cdots, 47, the second row 48,49,,9448, 49, \cdots, 94, and so on. He plants corn on any square of the form 47x+53y47x + 53y, for non-negative integers x,yx, y. Given that the unplanted squares form a contiguous region RR, find the perimeter of RR.

A number or a short expression. Spacing, $ signs and \frac vs / are all fine.

Official solution

1. Understanding the Problem:
Farmer John has a 47×5347 \times 53 rectangular grid. He plants corn on any square of the form 47x+53y47x + 53y for non-negative integers xx and yy. We need to find the perimeter of the contiguous region RR formed by the unplanted squares.

2. Expressibility:
A number is expressible if it can be written in the form 47a+53b47a + 53b for non-negative integers aa and bb. We need to determine which numbers are not expressible.

3. Chicken McNugget Theorem:
The Chicken McNugget theorem states that for two coprime integers mm and nn, the largest number that cannot be expressed as am+bnam + bn (where aa and bb are non-negative integers) is mnmnmn - m - n. Here, m=47m = 47 and n=53n = 53, which are coprime.

Therefore, the largest number that cannot be expressed is:
47534753=2491100=2391 47 \cdot 53 - 47 - 53 = 2491 - 100 = 2391

4. Non-expressible Numbers:
All numbers from 11 to 23912391 that cannot be expressed as 47a+53b47a + 53b are unplanted. However, since we are dealing with a grid, we need to consider the numbers modulo 4747 and 5353.

5. Column-wise Analysis:
We analyze the grid column-wise. Each column cc (where 1c461 \leq c \leq 46) contains numbers of the form c+47kc + 47k for k=0,1,2,k = 0, 1, 2, \ldots. We need to determine when c+47kc + 47k is expressible.

6. Modulo Condition:
Suppose c+47kc + 47k is expressible. Then, there exist non-negative integers aa and bb such that:
c+47k=47a+53b c + 47k = 47a + 53b
Rearranging, we get:
c=47(ak)+53b c = 47(a - k) + 53b
This implies c53b(mod47)c \equiv 53b \pmod{47}. Since 536(mod47)53 \equiv 6 \pmod{47}, we have:
c6b(mod47) c \equiv 6b \pmod{47}
Therefore, bc6(mod47)b \equiv \frac{c}{6} \pmod{47}.

7. Unplanted Squares in Each Column:
For each column cc, the number of unplanted squares is 9c(mod53)9c \pmod{53}. We need to count the unplanted squares in each column and determine the perimeter of the contiguous region RR.

8. Perimeter Calculation:
The unplanted squares form 8 "staircases" connected edge-to-edge. Each staircase has a maximum height and width. The perimeter of each staircase is 2(h+w)2(h + w).

Summing up the perimeters of all staircases:
2(5+45)+2(6+46)+2(6+47)+2(6+48)+2(6+49)+2(6+50)+2(6+51)+2(5+43)=850 2(5+45) + 2(6+46) + 2(6+47) + 2(6+48) + 2(6+49) + 2(6+50) + 2(6+51) + 2(5+43) = 850

9. Overcounting Correction:
We overcount twice the edges where the staircases are connected. The total length of these edges is 1+2++7=281 + 2 + \dots + 7 = 28. Therefore, we subtract 2282 \cdot 28 from the total perimeter.

Final perimeter:
850228=85056=794 850 - 2 \cdot 28 = 850 - 56 = 794

The final answer is 794\boxed{794}.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.