Divisibile by 7 theorem check

107 Views Asked by At

I have come up with a theorem to check if a number is divisible by 7.

A number is $\overline{abcdefg}$ will be divisible by 7 if the sum below is divisible by 7

$$(-2)^0a + (-2)^1b + (-2)^2c + (-2)^3d + (-2)^4e + (-2)^5f + (-2)^6g$$

It is valid for any number of digits.. I can prove it mathematically..

So I need your help to check if this theorem aren’t present/known to the world or not.

If not, what can be done to publish it.

1

There are 1 best solutions below

4
On

This is a trivial assertion if you understand modular arithmetic, which is absolutely basic in number theory.

Note that $1/(-2)\equiv 10 \pmod 7$, which implies your claim immediately.

However, this rule has disadvantages compared to the usual algorithm that decides if a number is divisible by $7$ or not (namely, break it up to $3$-digit numbers, add them with alternating signs, iterate...)

  • Your method only decides if the number is divisible by $7$, it does not return the remainder $\pmod 7$
  • Your method is very slow, it takes much more time to compute that expression than adding up $3$-digit numbers.

So I suggest you read about advanced number theory, and if you find an interesting open problem (that experts found interesting as well), work on it. But this result is unpublishable. In any case, congratulations for finding this method.