7-test and 13-test for correcting additions and multiplications

66 Views Asked by At

Design a seven-test and a thirteen-test for checking the correctness of additions and multiplications, based on modulo 7 and 13. Comment on the usefulness of your test.

I know that we can check that a number is divisible by 7 and 13, this is useful because these numbers are prime numbers. I could also find this website http://www.savory.de/maths1.htm where the author lays down some nice rules for divisibility tests. In class we treated the 9-test, which corresponded to adding up the digits and checking if this is divisible by $9$. I am not sure how we could define a useful test for 7 and 13 based on multiplications and additions.

Can somebody provide some insight?

1

There are 1 best solutions below

0
On BEST ANSWER

Some ideas/hints.

The complexity of the divisibility test for $d$ depends on the length of the period of the repeating part of the fraction $10/d$. That depends in turn on the sequence of remainders when you divide $10^k$ by $d$ (so modular arithmetic comes into play).

That's why the tests for $2$, $3$, $5$ and $9$ are nice. The tests for $7$ and $13$ are not.

The test for divisibility by $11$ is fun. It uses the alternating sum of the digits. See if you can understand why.

There's a nice divisibility test for $d=1001 = 7 \times 11 \times 13$ that can shorten the tests for $7$ and $13$.

See https://en.wikipedia.org/wiki/Divisibility_rule