Maths Olympiad Prep

Library / /1 of 8

Number theory Difficulty 6.2 National Olympiad Prove it Middle European Mathematical Olympiad (MEMO)

Problem:
The numbers from 11 to 201322013^{2} are written row by row into a table consisting of 2013×20132013 \times 2013 cells. Afterwards, all columns and all rows containing at least one of the perfect squares 1,4,9,,201321, 4, 9, \ldots, 2013^{2} are simultaneously deleted.
How many cells remain?

Solution

Solution:
Let m=503m = 503 and n=4m+1=2013n = 4m + 1 = 2013.
Note that
(m1)n=(m1)(4m+1)<m4m=(2m)2<m(4m+1)=mn (m-1)n = (m-1)(4m+1) < m \cdot 4m = (2m)^2 < m(4m+1) = mn
so the perfect square (2m)2(2m)^2 is in the mm-th row.
Note that (k+1)2k2=2k+1(k+1)^2 - k^2 = 2k + 1 is at most nn if k2mk \leq 2m and is at least nn if k2mk \geq 2m. Therefore, on the one hand, the first 2m+12m+1 perfect squares never skip a row and the first m+1m+1 rows are all deleted. On the other hand, the last n(2m1)=2m+2n - (2m-1) = 2m + 2 perfect squares are in pairwise distinct rows.
Thus, the first m+1m+1 rows and 2m2m more are deleted, so mm rows remain.
The jj-th column is deleted if and only if jj is a square modulo n=2013=31161n = 2013 = 3 \cdot 11 \cdot 61. By the Chinese Remainder Theorem, this is the case if and only if jj is a square modulo each of 33, 1111, and 6161. Since the numbers of squares for these three moduli are 22, 66, and 3131 respectively, the number of squares modulo nn, again by the Chinese Remainder Theorem, is 2631=3722 \cdot 6 \cdot 31 = 372. The number of remaining columns is therefore 2013372=16412013 - 372 = 1641.
The number of remaining cells is 5031641=825423503 \cdot 1641 = 825423.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.