3

For example, the test for divisibility by $2$ is quite obvious. But I am quite intrigued by the others, particularly $3$, $7$ and $11$. Also I have come across tests for numbers as far as $50$. How do people even think of these? And consequently, how do they prove it?

KonKan
  • 7,344
  • This might help: http://www.savory.de/maths1.htm – Steve Kass Mar 06 '16 at 03:26
  • @SteveKass He provided that link in his question. This is in interesting question. I wonder if these rules are used in the search for very large prime numbers (it would seem to be vastly more efficient). – Klik Mar 06 '16 at 03:28
  • 1
    I'm not a big fan of the divisibility "rule" for $7$. I think other than $2, 3,5,9,11$, there aren't many primes with useful divisibility rules ... – Zubin Mukerjee Mar 06 '16 at 03:29
  • The $11$ one is super lovely. Note that $11 \equiv -1 \pmod {10}$. Now think about how you can tell if a polynomial has $-1$ as a zero: If you think about plugging in $x = -1$ into $a_nx^n + a_{n - 1}x^{n - 1} + \ldots + a_1x + a_0$, you wind up with the alternating sum $a_0 - a_1 + \ldots \pm a_{n - 1} \mp a_n$: And that's the divisibility rule for $11$, but with the digits! – pjs36 Mar 06 '16 at 03:31
  • @pjs36 That is lovely. But what is the intuition behind trying to find a polynomial with $-1$ as a zero after stating that $11\equiv -1(\mod 10)$? – Airdish Mar 06 '16 at 03:33
  • @ZubinMukerjee What about GIMPS? The current highest prime is $2^{74207281}-1$ I imagine it saves a lot of time to use clever rules like these. – Klik Mar 06 '16 at 03:33
  • @Klik Do mathematicians use computer programs to find large primes? If so I imagine that neat tricks would save alot of time in their algorithms... – Airdish Mar 06 '16 at 03:35
  • @Klik Yes, I'm sure a ton of clever tricks go into verifying that something like that is prime. But I am more talking about how divisibility rules are taught in grade school as useful for mental arithmetic or whatever. I personally think $2,3,5,9,11$ are the only ones worth learning for that purpose. – Zubin Mukerjee Mar 06 '16 at 03:36
  • @TheOddbodNumber Yes, it is all done by computer. For the GIMPS project they check the numbers that follow the Mersenne Primes which is a number found by $2^{n}-1$ which is sometimes a prime number (hence why they have to check it) – Klik Mar 06 '16 at 03:37
  • @TheOddbodNumber The base $10$ representation of a number is the value of some polynomial in $x$ at $x=10$. For example:

    $$2016 = 2x^3 + x + 6$$

    So $2016$ is the value of that cubic polynomial at $x=10$. In the case of modulo $11$, we can replace $x=10$ with $x=-1$, which gives us the divisibility trick.

    – Zubin Mukerjee Mar 06 '16 at 03:43
  • Indeed, note that I mixed up my modulus there, I meant to say $10 \equiv -1 \pmod{11}$ – pjs36 Mar 06 '16 at 03:46
  • See http://math.stackexchange.com/questions/328562/divisibility-criteria-for-7-11-13-17-19 – lab bhattacharjee Mar 06 '16 at 09:00

2 Answers2

2

There are various methods for developing divisibility criteria. Here is a fairly general one:

Let's develop a divisibility criterion for example with $13$. Take any integer $n$ with digits $a_k,a_{k-1},...,a_2,a_1,a_0$ and write its decimal expansion: $$n = (a_k \times 10^k) + (a_{k-1} \times 10^{k-1}) + .... + (a_2 \times 10^2) + (a_1 \times 10^1) + a_0$$ Notice the following congruences: $$10^0 \equiv 1 \ \ mod 13 \\ 10^1 \equiv 10 \ \ mod 13 \equiv (-3) \ \ mod 13 \\ 10^2 \equiv 9 \ \ mod 13 \equiv (-4) \ \ mod 13 \\ 10^3 \equiv 12 \ mod 13 \equiv (-1) \ \ mod 13 \\ 10^4 \equiv 3 \ \ mod 13 \\ 10^5 \equiv 4 \ \ mod 13 \\ 10^6 \equiv 1 \ \ mod 13 \\ \vdots $$ this means we get the $6$-step cycle: $$1,-3,-4,-1,\ 3,\ 4,\ 1,-3,...$$ thus: $${\small n\equiv\big(a_0+a_1\times(-3)+a_2\times (-4)+a_3\times(-1)+a_4\times 3+a_5 \times 4+a_6\times 1+a_7\times(-3)+...\big)\ \ mod 13}$$ Setting $${\small m = a_0 + a_1 \times (-3) + a_2 \times (-4) + a_3 \times (-1) + a_4 \times 3 + a_5 \times 4 + a_6 \times 1 + a_7 \times (-3) + ...}$$ it is clear that: $$n\equiv m \ \ mod 13$$ and that: $$m<n$$ and thus it is easier to check if $m$ is divisible by $13$. Notice that $$m\mid 13 \Leftrightarrow n\mid 13$$ Repeat as many times as necessary.

The above method works for any integer, however it is not the only applicable method. There other criteria as well (for any integer) that can be developed either through systematic or heuristic methods.

KonKan
  • 7,344
1

There's also the casting out rule. If $x$ is divisible by $n$ then $x - a*n*10^k$ is divisible by $n$. So one common trick is to multiply $n$ by something to get a number with last digit of 1 or maybe 9 and remove the last digit and cast acordingly.

Example: 23.

23*3 = 69. = 70 - 1. So $23|x \iff 23|(x + 70a - a)/10$.

So the rule is: take off the last digit. multiply it by 7. Add. repeat.

So for example: 23*1234 = 28382.

Take off the last digit. 2838. Multiply 2*7 = 14. Add 2838 + 14 = 2852. Repeat.

  1. 2*7 = 12. 285+14 = 299. 29. 9*7 = 63. 29+63 = 92. 9. 2*7 = 14. 9+14 = 23. It is divisible by 23.

Let's make one up for 37. 37*3 = 111. Oh! This is really good! If the last digit is a just subtract aaa and divide by 10.

Example: 8658. Subtract 888. 8658 - 888 = 777. Subtract 777. 777-777= 0. It's divisible by 37.

Let's make one for 43. 43*3 = 129 or 43*7 = 301. Truncate the last digit and subract 30 times it. Or truncate the last digit and add 13 times it.

43*9876 =424668

Truncate the 8: 42466. 8*30=240; subtract 240. 42226. Truncate the 6: 4222. 6*30 = 180; subtract 180. 4042. Truncate 2, subtract 60. 404 - 60 = 344. Truncate the 4: 34 and subtract 120: -86. Take absolute power. 86 subtract 43 and get 43. The test passes.

And so on.

=====

But to be honest, other than the 3, 9 and 11 test I hate these tests and prefer to cast directly.

Ex. Is 748354062 divisible by 57?

$748,354,062 - 570,000,000 \equiv 178,354,062 - 57,000,000 \equiv 131,354,062 - 57,000,000 \equiv 74,354,062 - 57,000,000 \equiv 17,354,062 -11,400,000 \equiv 5,954,062 - 5,700,000 \equiv 254,062 - 114,062 \equiv 140,062 - 114,000 \equiv 26,062 - 11,400 = 14,962 - 11,400 \equiv 3,562 - 570 \equiv 2,992 - 2,280 \equiv 712 - 570 \equiv 142 - 114 \equiv 28 \mod 57$.

So not only is it not divisible by 53, I know the remainder is 28. (I like to do this as I ride my bicycle and pass street addresses.)

fleablood
  • 124,253