MathLabs

Problem 2

Given a triangular arrangement of 99 circles along the perimeter of a triangle, with 44 circles on each of the three sides (three vertex circles shared by adjacent sides and two interior circles on each side), each of the numbers 1,2,…,91, 2, \ldots, 9 is to be written into one of these circles, so that each circle contains exactly one of these numbers and: (i) the sums of the four numbers on each side of the triangle are equal; (ii) the sums of the squares of the four numbers on each side of the triangle are equal. Find all ways in which this can be done.
Step 2 of 4: Use modulo 3 arithmetic to narrow the vertices to three residue classes
In plain words

Once the vertices are forced to share the same remainder modulo 33, they must exhaust one of the three residue classes {1,4,7}\{1, 4, 7\}, {2,5,8}\{2, 5, 8\}, or {3,6,9}\{3, 6, 9\}.

a+b+c≡0(mod3),a2+b2+c2≡0(mod3)  ⟹  {a,b,c}∈{{3,6,9},{1,4,7},{2,5,8}}a + b + c \equiv 0 \pmod{3}, \quad a^2 + b^2 + c^2 \equiv 0 \pmod{3} \implies \{a, b, c\} \in \{\{3, 6, 9\}, \{1, 4, 7\}, \{2, 5, 8\}\}
Detailed analysis

Every integer square satisfies x2≡0x^2 \equiv 0 or 1(mod3)1 \pmod{3}, so a2+b2+c2≡0(mod3)a^2 + b^2 + c^2 \equiv 0 \pmod{3} holds if and only if either all three of a,b,ca, b, c are divisible by 33 or none of them is divisible by 33. Combining this with a+b+c≡0(mod3)a + b + c \equiv 0 \pmod{3} shows that all three vertices must be congruent modulo 33. Since there are only three numbers in each residue class, {a,b,c}∈{{3,6,9},{1,4,7},{2,5,8}}\{a, b, c\} \in \{\{3, 6, 9\}, \{1, 4, 7\}, \{2, 5, 8\}\}.