For every integer consider the table with entry at the intersection of row and column , for every and . Determine all integers for which the sum of the entries in the table is equal to .
, 2021
Solutions — 2
Solution 1
Answer: All integers for which is a prime.
First, observe that every pair of real numbers for which the sum is integer satisfies
The inequality is strict if and are integers, and it holds with equality otherwise.
We estimate the sum as follows.
The inequality in the last line follows from (1) by setting and , so that is integral.
Now if and only if the inequality in the last line holds with equality, which means that none of the values with may be integral.
Hence, if is composite with factorisation for , one gets a strict inequality for and . If is a prime, then is never integral and .
Solution 2
To simplify the calculation with indices, extend the table by adding a phantom column of index 0 with zero entries (which will not change the sum of the table). Fix a row with , and let and . For columns , define the remainder . We first prove the following
Claim. For every integer with , the remainders with indices in the range
form a permutation of the numbers .
Proof. If holds for two indices and in (2), then , so that is a multiple of ; since , this implies . Hence, the remainders are pairwise distinct. Moreover, each remainder is a multiple of . This proves the claim.
We then have
By using (3), compute the sum of row as follows:
Equation (4) yields the following lower bound on the row sum , which holds with equality if and only if :
By summing up the bounds (5) for the rows , we get the following lower bound for the sum of all entries in the table
In (6) we have equality if and only if equality holds in (5) for each , which happens if and only if for each , which is equivalent to the fact that is a prime. Thus the sum of the table entries is if and only if is a prime.