I have seen other criteria for divisibility by $7$. Criterion described below present in the book Handbook of Mathematics for IN Bronshtein (p. $323$) is interesting, but could not prove it. Let $n = (a_ka_{k-1}\ldots a_2a_1a_0)_{10} = \displaystyle{\sum_{j=0}^{k}}a_{k-j}10^{k-j}$. The expression $$ Q_{3}^{\prime}(n) = (a_2a_1a_0)_{10} - (a_5a_4a_3)_{10} + (a_8a_7a_6)_{10} -\ldots $$ are called alternating sum of the digits of third order of $n$. For example, $$ Q_{3}^{\prime}(123456789) = 789-456+123=456 $$ Proposition: $7 | n \ \Leftrightarrow \ 7 | Q_{3}^{\prime}(n)$.
What would be the proof of this?
Thanks for any help.
Hint. $10^{6k}-1 \equiv 10^{6k - 3}+1 \equiv 0 \pmod{7}$.