A question of NUMBER THEORY and divisibility of 7 There is a question in my book  ( Pathfinder for Olympiad mathematics):

Let T be the set of all triplets (a, b, c) of integers such that
$1 ≤ a ≤ b ≤ c ≤ 6$. For each triplet (a, b, c) in T, take the number $a × b × c$ and add all
these numbers corresponding to all the triplets in T. Prove that this sum is divisible by 7.

I tried but couldn't get through the question. The solution says this :

If (a, b, c) is a valid triplet then $(7 - c, 7 - b, 7 - a)$ is also a valid triplet as $1 ≤ (7 - c) ≤ (7 - b) ≤ (7 - a) ≤ 6 \; 
And \; (7 - b) ≠ b$, etc.
Let $S = \sum_{1 ≤ a ≤ b ≤ c ≤ 6} (abc)$ ,
then by the above $S= \sum_{1 ≤ a ≤ b ≤ c ≤ 6}(7-a)(7-b)(7-c)$.

And then the above two equations were added and we got the desired answer.
But I would like to know that is there any alternate method of solving this question ( please don't tell me to multiply those digits and get the numbers and add them and check the divisibility) that can be easily understood by a high school student ?
Thanks in advance.
 A: Here is another answer that uses the observation:
(A) $(7-a)(7-b)(7-c) \equiv -abc \mod 7$.
But also note (B): $$\sum_{a,b,c} abc  = \sum_{a,b,c} (7-c)(7-b)(7-a)$$
(because the sets $\{(a,b,c)$; $1 \le a\le b\le c\le 6\}$ and $\{(7-c, 7-b, 7-a)$; $1 \le a \le b \le c \le 6\}$ are clearly the same)
But putting (A) and (B) together gives $\sum_{a,b,c} abc =$ $\sum_{a,b,c} (7-c)(7-b)(7-a) \equiv_7 -1 \left(\sum_{a,b,c} abc\right)$. Thus we conclude from this string:
$$\sum_{a,b,c} abc \equiv_7 -1 \sum_{a,b,c} abc$$
and so $\sum_{a,b,c} abc$ has to be 0 mod 7.
A: Note that the six numbers concerned satisfy $x^6-1\equiv 0 \bmod 7$ (little Fermat) and the sum of the products of distinct triples of roots is the negative of the coefficient of $x^3$ which is zero.
ie $x^6-1\equiv (x-1)(x-2)(x-3)(x-4)(x-5)(x-6) \bmod 7$ expressing the polynomial as a product of the factors belonging to the six distinct roots.

If you need to expand $(x-1)(x-2)(x-3)(x-4)(x-5)(x-6)$ modulo $7$ to prove this (and incidentally do all the direct computations for the original question in a hidden way) you can rewrite (modulo $7$) as:$$(x-1)(x-2)(x-3)(x+3)(x+2)(x+1)=$$$$=(x^2-1)(x^2-4)(x^2-2)=(x^4+2x^2+4)(x^2-2)=x^6-1$$ where the first step mirrors the hint given.
A: Let $\cal{S}$ be the set of 3-element multisets of $\{1,2, \ldots 6\}$. For each $a \in \{1,\ldots , 6\}$ and each $S = \{s_1,s_2,s_3\} \in \cal{S}$ let $aS =\{as_1,as_2,as_3\}$ where multiplication is done $\mod 7$ and for each $S = \{s_1,s_2,s_3\} \in \cal{S}$ write as $f(S) = s_1s_2s_3$. Then
note the following:

*

*You are looking for $\sum_{S \in \cal{S}} f(S) \mod 7$.


*$a\cal{S} \doteq \{aS; S \in \cal{S} \}$, is precisely $\cal{S}$.


*For each $a=1,2, \ldots 6$, the following is true: $a^3 \times \sum_{S \in \cal{S}} f(S) \mod 7$ $=$ $\sum_{S \in \cal{S}}  f(aS)\mod 7=\sum_{aS; S \in \cal{S}} f(aS) \mod 7 = \sum_{S' \in \cal{S}} f(S')\mod 7$[from 2.]. So
$a^3 \times \sum_{S \in \cal{S}} f(S) = \sum_{S \in \cal{S}} f(S)\mod 7$.


*But $-1$ is a cube $\mod 7$. In particular, if $a=3$ then $a^3\mod 7$ is $-1$.


*So we have established that $-1 \times \sum_{S \in \cal{S}} f(S) = \sum_{S \in \cal{S}} f(S) \mod 7$. Let $c$ be an integer $\mod 7$. If $-c=c \mod 7$ then $c$ must be $0$.
Can you finish from there?
