3

I am stuck on a problem involved with proving divisibility rules for 7.

Let $n\in \mathbb{N}$ and let $\displaystyle n=\sum_{i=0}^k a_i \cdot 10^i$ be its decimal expression where $a_i\in \{0,1,2,3,4,5,6,7,8,9\}$. Find a necessary and sufficient condition on $\{a_i\}$ so that $7|n$, and please provide proof.

Basically this problem asks you to give a set of rules to predict the divisibility of 7. For instance, for an integer to be divisible by 3, the sum of its digits must be divisible by 3. So I need to get a rule for that. I have wiki'ed the rule and know what it is, but I also need to provide proof. That is where I am stuck.

mrQWERTY
  • 595

1 Answers1

4

Here is one divisibility rule:

Remove the last digit, double it, subtract it from the truncated original number and continue doing this until only one digit remains. If this is 0 or 7, then the original number is divisible by 7.

Hint: To prove, use this recursively: $10A+B=10(A-2B) \mod 7$.

Some tests

qwr
  • 10,716