Prime Numbers Wiki
(Updated)
Tag: rte-source
No edit summary
(20 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''''Please note that the divisibility rule 7 is tentative.   There is technically no shortcut.'''''
+
''For explanation of each divisibility rules sorted by order, see [[List of Divisibility Rules]].''
   
  +
'''Divisibility rules''' are shorthand ways of division to tell if one number is divisible or not. They help tell whether the specific number you are looking for is prime or not. The many divisibility rules help many mathematicians and geniuses determine prime numbers, even if the number is beyond big.
'''''-3primetime3-'''''
 
 
'''Divisibility rules''' are shorthand ways of division to tell if one number is divisible or not.  They help tell whether the specific number you are looking for is prime or not. The many divisibililty rules help many mathematicians and geniuses determine prime numbers, even if the number is beyond big.
 
   
 
Let's look at some divisibility rules:
 
Let's look at some divisibility rules:
  +
{| class="collapsible" style="margin:6px auto; width:100%; background:transparent; border:2px solid #AAA; padding:5px;"
==First 12==
 
  +
! style="text-align:left;" | <h2 style="border:none;">Basic Rules</h2>
{| class="wikitable"
 
! Divisor
 
! Test
 
! Example
 
 
|-
 
|-
  +
|
|id=1| '''1'''
 
  +
The following rules are elementary checks:
| Every number is divisible by one.
 
| 4623 is divisible by one, and even the greatest prime integer is greater than one.
 
|-
 
|id=2| '''2'''
 
| Every number apart from 0 which ends with 0, 2, 4, 6 or 8 is divisible by two.
 
| 65156151594 is divisible by two because the units digit is 4, and 1597534568852 is divisible by two because the units digit is 2.
 
|-
 
|id=3| '''3'''
 
| A number is divisible by 3 if the''' '''sum of its digits is divisible by 3.
 
| Is 12423 divisible by 3?
 
   
  +
<big> Divisibility by 1 </big>
   
  +
[[File:1.png|thumb|Divisibility Rule 1|100px]]
#Add all the digits together, we get 1 + 2 + 4 + 2 + 3 = 12.
 
#12 is divisible by 3, so 12423 is, too.
 
|-
 
|id=4| '''4'''
 
| A number is divisible by four if and only if its last two digits fo the number are divisible by four.
 
| 156128 is divisible by four, and 6416 is divisible by four. The last two digits are 28 and 16, respectively, both of which are divisible by 4.
 
|-
 
|id=5| '''5'''
 
| A number is divisible by 5 if and only if the last digit is a 0 or 5.
 
| 213478765 is divisible by 5 because the last digit is 5.
 
|-
 
|id=6| '''6'''
 
| Because its prime factorization is 2 x 3, it should be divisible by those two numbers.
 
| Is 4,044 divisible by 6?
 
   
  +
Every integer is divisible by one.  Example: 1289 is divisible by one, and 14461 is divisible by one.
   
  +
'''Proof:'''<br/>
#4,044 is even, so it is divisible by 2.
 
  +
There is no need for a proof here.  Any number is divisible by one.  This rule does not apply to differentiate prime from composite numbers.
#4 + 4 + 4 is 12, so it is divisible by 3.
 
#Therefore, 4,044 is indeed a multiple of 6.
 
|-
 
|id=7| '''7 (method 1)'''
 
| The first method is to take the last digit of the number, multiply it by two, then subtract it to the remaining digits of the number. Repeat the process until the result can be easily identified.
 
| Is 3409 is divisible by 7?
 
   
  +
<big>Examining the last ''n'' digits</big>
   
  +
[[File:Ending Digit.png|thumb|230px|right|Examining the last '''n''' digits]]
#Take 9 from 3409.
 
  +
Simply examine the last n digits if the divisor can divide 10<sup>n</sup> with no remainder.
#Multiply 9 by 2 (9*2=18)
 
#Subtract the doubled digit to the remaining number (340-18=322)
 
#Repeat the progress, this time take 2 from 322.
 
#Multiply 2 by 2 (2*2=4)
 
#Subtract the doubled digit to the remaining number (32-4=28)
 
#28 is divisible by 7, so 3409 is divisible by 7. (The real answer is 487)
 
|-
 
|id=7| '''7 (method 2)'''
 
| Sort the numbers in blocks of three. Then, add the first group from the right, subtract the second group, then add the third, subtract the fourth, and so on. This is called alternating sum. If the result number is the multiple of 7, then the number is divisible by 7.
 
| Is 1702906247 divisible by 7?
 
   
  +
As such:
   
  +
*''Examining 1 ending digit:''
#Group the numbers into blocks of three: 247, 906, 702, 1
 
  +
:#Every integer which ends with 0, 2, 4, 6 or 8 is '''divisible by two'''. {{Divisibility Proof|2}}  <br/>''Example:''65156151594 is divisible by two because the units digit is 4, and 1597534568852 is divisible by two because the units digit is 2.
#Form the alternating sum: 247 - 906 + 702 - 1 = 42
 
  +
:#A number is '''divisible by 5''' if and only if the last digit is a 0 or 5. {{Divisibility Proof|5}} <br/>''Example:''41645 is divisible by five because the units digit is 5, and 124150 is divisible by five because the units digit is 0.
#Since 42 = 7 * 6, 42 is divisible by 7, thus 1702906247 is, too.
 
  +
:#If the last digit of the number is 0, it is '''divisible by 10'''. {{Divisibility Proof|10}} <br/>''Example:''158375209580 is divisible by 10 because the last digit is 0.
|-
 
  +
*''Examining 2 ending digits:''
|id=8| '''8'''
 
| It is very simple, check whether the last three digits of the number is divisible by 8, if it is, then the number is divisible by 8.
+
:#A number is '''divisible by four''' if and only if its last two digits of the number are divisible by four. {{Divisibility Proof|4}}<br/>''Example:''156128 is divisible by four, and 6416 is divisible by four. The last two digits are 28 and 16, respectively, both of which are divisible by 4.
  +
:#For an integer to be '''divisible by 20''', the last two digits need to end in 20, 40, 60, 80, and 00, all of which are divisible by 20.<br/>''Example:''913580 is divisible by 20.
| Is the number 7,377,473,496 divisible by 8?
 
  +
:#For an integer to be '''divisible by 25''', the last two digits need to end in 25, 50, 75, and 00, all of which are divisible by 25.<br/>''Example:''143475 is divisible by 25.
  +
:#For an integer to be '''divisible by 50''', the last two digits need to end in 50 and 00, both of which are divisible by 50.
  +
:#For an integer to be '''divisible by 100''', the last two digits need to end in 00.
  +
*''Examining 3 ending digits:''
  +
:#A number is '''divisible by eight''' if and only if its last three digits of the number are divisible by eight. <ref>http://easycalculation.com/funny/shortcuts/divide-by-8.php</ref><br/>''Example:''4313586 is divisible by 8 since the last three digits are 586, divisible by 8.
  +
:#For an integer to be '''divisible by 40''', the last three digits must be divisible by 40.
  +
*''Examining 4 ending digits:''
  +
:#A number is '''divisible by 16''' if and only if its last four digits of the number are divisible by 16.<br/>''Example:''28112 is divisible by 16 since the last four digits are 8112, divisible by 16.
  +
:#For an integer to be '''divisible by 80''', the last four digits must be divisible by 80.
  +
*''Examining 5 ending digits:''
  +
:#A number is '''divisible by 32''' if and only if its last five digits of the number are divisible by 32.
  +
:#For an integer to be '''divisible by 160''', the last five digits must be divisible by 160.
  +
*''Examining 6 ending digits:''
  +
:#A number is '''divisible by 64''' if and only if its last six digits of the number are divisible by 64.
  +
:#For an integer to be '''divisible by 320''', the last six digits must be divisible by 320.
   
  +
'''Proof:'''<br/>
  +
First of all, let's suppose that 10<sup>n</sup> is divisible by '''d''', expressed in an equation: <math>10^n \equiv 0 \pmod{d}</math>. Then, let '''a''' be an integer with '''k''' number of digits, and assume that k is larger than n: <math>k \ge n, k \in N</math>. The largest digit of '''a''' is a<sub>k</sub>, and the smallest digit is a<sub>1</sub>. <!--Note, this page corrects the mistake that the smallest digit is not a<sub>0</sub>-->
   
  +
<math>\begin{align}
#Take the last three digits of the number.
 
  +
a & = [a_ka_{k-1} \cdots a_2a_1] \\
#The last three digit is 496, so check whether it is divisible by 8.
 
  +
& = 10^n [a_ka_{k-1} \cdots a_n] + [a_{n-1} a_{n-2} \cdots a_2a_1]\\
#496 is divisible by 8, So the number 7,377,473,496 is divisible by 8.
 
  +
& \equiv (a_{n-1}a_{n-2} \cdots a_2a_1) \pmod{d}\\
  +
\end{align}</math>
   
  +
Due to this, a is divisible by '''d''' if and only if the last n digits of a is divisible by '''d'''.<ref>http://webspace.ship.edu/msrenault/divisibility/StupidDivisibilityTricks.pdf</ref>
   
  +
<big>Adding blocks of digits</big>
   
  +
[[File:Digit Sum.png|thumb|300px|right|Digit sum]]
  +
Starting from the right to left, sum up all the digits in blocks of ''n'' digits. This works for the following numbers:
   
  +
*1-digit blocks
Is the number 546,632,318 divisible by 8?
 
  +
:*'''3''': To put it simpler, add up all the digits and examine if the number is divisible by 3. {{Divisibility Proof|3}} <br/>''Example:'' Examining the divisibility of 12423 by 3 &mdash; By adding all the digits together, we get 1 + 2 + 4 + 2 + 3 = 12. Since 12 is divisible by 3, the test is positive.
#The last three digit is 318.
 
  +
:*'''9''': Add all the digits together. The only step different is to check if it is the multiple of 9 instead of 3. {{Divisibility Proof|9}} <br/>''Example:'' Examining the divisibility of 14625 by 9 &mdash; By adding all the digits together, we get 1 + 4 + 6 + 2 + 5 = 18. Since 18 is divisible by 9, the test is positive.
#However, 318 is not divisible by 8, so the number 546632318 is not divisible by 8.
 
  +
*2-digit blocks
|-
 
  +
:*'''11''': Add up the digits in groups of two from right to left and check if the number is divisible by 11.<br/>''Example:'' Examining the divisibility of 19074 by 11 &mdash; By adding groups of digits from right to left, we get 74 + 90 + 1 = 165. Since 165 is divisible by 11, the test is positive (if needed, one can perform the test many times).
|id=9|'''9'''
 
| Add all the digits together. The only step different is to check if it is the multiple of 9 instead of 3.
+
:*'''33''': Add up the digits in groups of two from right to left and check if the number is divisible by 33.
  +
:*'''99''': Add up the digits in groups of two from right to left and check if the number is divisible by 99.
| Is 14625 divisible by 9?
 
  +
*3-digit blocks
  +
:*'''27''': Add up the digits in groups of three from right to left and check if the number is divisible by 27.<br/>''Example:'' Examining the divisibility of 34803 by 27 &mdash; By adding groups of digits from right to left, we get 803 + 34 = 837. 837 is divisible by 27<sup>[A]</sup>.
  +
:*'''37''': Add up the digits in groups of three from right to left and check if the number is divisible by 37.<br/>''Example:'' Examining the divisibility of 24215797 by 37 &mdash; By adding groups of digits from right to left, we get 797 + 215 + 24 = 1036. Applying the trick again, 36 + 1 = 37. Since 37 is divisible by 37, the test is positive<sup>[A]</sup>.
  +
*4-digit blocks
  +
:*'''101''': Add up the digits in groups of four from right to left and check if the number is divisible by 37.
   
  +
<big> Alternating Sum </big>
   
  +
[[File:Alt Sum.png|thumb|300px|right|Alt sum]]
#Add all the digits together: 1 + 4 + 6 + 2 + 5 = 18
 
  +
First, sort the numbers in groups of ''n'' digits from right to left. Alternate between adding and subtracting them. In other words, after adding the first group, continue subtracting the second group, adding the third group, subtracting the fourth group, adding the fifth group, and so on. This is called the alternating sum.<ref>http://mathforum.org/k12/mathtips/ward2.html</ref> This works for the following numbers:
#18 is divisible by 9, so 14625 is, too.
 
|-
 
|id=10|'''10'''
 
|If the last digit of the number is 0, it is divisible by 10.
 
|158375209580 is divisible by 10 because the last digit is 0.
 
|-
 
|id=11|'''11'''
 
|Check the number, if the difference of sum of digits at odd places and sum of digits at even places is 0 or divisible by 11, then the number is divisible by 11.
 
|Is 527901 divisible by 11?
 
   
  +
*1-digit blocks
#First, check the number.
 
  +
:*'''11''': From right to left, add the rightmost digit, then subtract the 2nd-to-right digit, add the 3rd-to-right digit, then subtract the 4th-to-right digit, and so on. This can be further simplified by adding all the digits in odd places and all the digits in even places separately, and then find the difference of the two. <br/>''Example:''For the divisibility of 527901 by 11, we first add up the digits in odd places counting from the right (in this case, 2+9+1=12), the digits in even places (in this case, 5+7+0=12). The difference is 12 - 12 = 0; therefore 527901 is divisible by 11.
#Add the digits at odd places (in this case, 5+7+0=12)
 
  +
*2-digit blocks
#Add the digits at even places (in this case, 2+9+1=12)
 
  +
:*'''101''': Add up the first group of 2 digits from the right, subtract the second group, add the third group, subtract the fourth group, and so on. <br/>''Example:''For the divisibility of 146147 by 101, we find the alternating sum: 47 - 61 + 14 = 0. Since 0 is divisible by 101, the test is positive.
#Subtract the sum of digits at odd places and sum of digits at even places (12-12=0)
 
  +
*3-digit blocks
#The result is 0, so 527901 is divisible by 11. (The real answer is 47991)
 
  +
:*'''7''': Find the alternating sum in groups of 3 digits from right to left. <br/>''Example:''For the divisibility of 1702906247 by 7, group the numbers into blocks of three (247, 906, 702, 1) and form the alternating sum (247 - 906 + 702 - 1 = 42). Since 42 = 7 * 6, 42 is divisible by 7, thus 1702906247 is divisible by 7.
|-
 
  +
:*'''13''': Find the alternating sum in groups of 3 digits from right to left. <br/>''Example:''Take 3,692,513,279 for example, the alternating sum is -3 + 692 - 513 + 279 = 455<sup>[A]</sup>. 455 is divisible by 13, and therefore 3,692,513,279 is divisible by 13.
|1d=12|'''12'''
 
  +
:*'''77''': Find the alternating sum in groups of 3 digits from right to left. 77 is the product of 7 and 11.
|Because its prime factorization is 2^2 x 3, it needs to be divisible by 4 and 3.
 
  +
:*'''91''': Find the alternating sum in groups of 3 digits from right to left. 91 is the product of 7 and 13.
|Is 9,180 divisible by 12?
 
  +
*4-digit blocks
  +
:*'''73''': Find the alternating sum in groups of 4 digits from right to left.
   
  +
'''Note:''' A. With the 3-digit digit sum method, if the result is still not easy to determine, the "right trim method" below can be used to further examine it.
#9,180 ends in 80 (4*20), so it is divisible by 4.
 
#9 + 1 + 8 + 0 is 18, so it is divisible by 3.
 
#Therefore, 9,180 is a multiple of 12.
 
 
|}
 
|}
   
  +
{| class="collapsible" style="margin:6px auto; width:100%; background:transparent; border:2px solid #AAA; padding:5px;"
==Beyond 12==
 
  +
! style="text-align:left;" | <h2 style="border:none;">Advanced Rules</h2>
===Divisibility by 13===
 
  +
|-
  +
|
  +
<big> Right trim </big>
   
  +
For the number '''a''' to test divisibility by '''d''', take off the last digit, multiply it by '''x''', and then add it to all of the remaining digits on the left.
There is no shortcut for testing divisibility of this particular number, either.
 
   
  +
By the elementary number theory results, if the greatest common divisor of '''d''' and 10 is 1 (i.e. the number '''d''' has the last digit of 1, 3, 7, or 9), there will be a number '''x''' that can allow <math>10x \equiv 1 \pmod{d}</math>. The term for this sort of number is named '''inverse''' of 10 modulo '''d''', and it can be written as <math>x \equiv 10^{(-1)} \pmod{d}</math>. This would allow the number to be trimmed from the right by 1 digit, multiplied by '''x''', and then be added to the remaining digits.
====Method 1====
 
   
  +
Similarly, there also exist a number that can allow <math>100x \equiv 1 \pmod{d}</math>, and it can be written as <math>x \equiv 10^{(-2)} \pmod{d}</math>. The number would then be able to be trimmed, multiplied by '''x''', and then be added to the remaining digits.
The first method is to take the last digit of the number, multiply it by four, then add it to the remaining digits of the numbers. Repeat the process until the result can be easily identified. This is similar to [[Divisibility Rules#Divisibility by 7|divisibility of 7]].
 
   
'''Example:'''
+
'''Examples:'''<br/>
  +
For the first example, to test divisibility of 3409 by 7:[[File:RT ex1.png|thumb|132px|right|Testing if 3,409 is divisible by 7.]]
   
  +
''Since 10x2 ≡ -1 (mod 7), we can take out the last digit, multiply it by 2, and then subtract it from the remaining digits. Therefore:''
Take 85969 for example.
 
  +
#Take 9 from 3409.
  +
#Multiply 9 by 2 (9*2=18)
  +
#Subtract the doubled digit to the remaining number (340-18=322)
  +
#Repeat the process, this time take 2 from 322.
  +
#Multiply 2 by 2 (2*2=4)
  +
#Subtract the doubled digit to the remaining number (32-4=28)
  +
#28 is divisible by 7, so 3409 is divisible by 7. (The answer of 3409 divided by 7 is 487)
  +
  +
Take 85969, for another example, to test divisibility of 13:[[File:RT ex2.png|thumb|120px|right|Testing if 85,969 is divisible by 13.]]
  +
  +
''Since 10x4 ≡ 1 (mod 13), we can take out the last digit, multiply it by 4, and then add it to the remaining digits. Therefore:''
 
#Take out 9 from 85969.
 
#Take out 9 from 85969.
 
#Multiply if by four. (9 x 4 = 36)
 
#Multiply if by four. (9 x 4 = 36)
Line 135: Line 134:
 
#91 is divisible by 13, so 85969 is also divisible by 13.
 
#91 is divisible by 13, so 85969 is also divisible by 13.
   
  +
<big> Full list below 101 </big>
====Method 2====
 
   
  +
Any inverse of 10 modulo '''d''' or 100 modulo '''d''' will work, thus there are two methods for the former, and two methods for the latter to do the trimming. The method can be applied to the following numbers:
The second method, also similar to [[Divisibility Rules#Divisibility by 7|divisibility of 7]], is use the alternating sums. After sorting the numbers in blocks of three, add the first group from the right, subtract the second group, then add the third, subtract the fourth, and so on. At last, check if the result is the multiple of 13 (If needed, use Method 1 to further reduce down a 3-digit number).
 
   
  +
<!--Examples to be added using a template-->
'''Example:'''
 
  +
{{Divisibility Table B Header|1-digit or 2-digitRight trimming (3 ~ 49)}}
  +
{{Divisibility Table B|3|-2, '''1'''|-2, 1
  +
|notes=''While already covered in previous methods, an alternative method is to add 1 time the last digit to the remaining digits, or subtract 2 times the last digit to the rest.''
  +
|examples=
  +
}}
  +
{{Divisibility Table B|7|'''-2''', 5|-3, 4
  +
|notes=To check divisibility of 7, subtract 2 times the last digit to the remaining digits. Alternatively, add 5 times the last digit to the rest. {{Divisibility Proof|7}}
  +
|examples=
  +
}}
  +
{{Divisibility Table B|9|-8, '''1'''|-8, 1
  +
|notes=''While already covered in previous methods, an alternative method is to add 1 time the last digit to the remaining digits, or subtract 8 times the last digit from the rest.''
  +
|examples=
  +
}}
  +
{{Divisibility Table B|11|'''-1''', 10|-10, '''1'''
  +
|notes=''While already covered in previous methods, an optional method is to subtract 1 time the last digit from the remaining digits, or add 1 time the last two digits to the rest.''
  +
|examples=
  +
}}
  +
{{Divisibility Table B|13|-9, '''4'''|-10, 3
  +
|notes=To check divisibility of 13, add 4 times the last digit to the remaining digits. Alternatively, subtract 9 times the last digit to the rest.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|17|'''-5''', {{ItG|12}}|-9, 8
  +
|notes=To check divisibility of 17, subtract 5 times the last digit from the remaining digits. Adding 12 times the last digit is not recommended.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|19|{{ItG|-17}}, '''2'''|{{ItG|-15}}, 4
  +
|notes=To check divisibility of 19, add 2 times the last digit to the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|21|'''-2''', {{ItG|-19}}|{{ItG|-17}}, 4
  +
|notes=To check divisibility of 21, subtract 2 times the last digit from the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|23|{{ItG|-16}}, '''7'''|-20, 3
  +
|notes=To check divisibility of 23, add 7 times the last digit to the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|27|'''-8''', {{ItG|19}}|{{ItG|-17}}, 10
  +
|notes=To check divisibility of 27, subtract 8 times the last digit from the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|29|{{ItG|-26}}, '''3'''|-20, 9
  +
|notes=To check divisibility of 29, add 3 times the last digit to the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|31|'''-3''', {{ItG|28}}|{{ItG|-22}}, 9
  +
|notes=Subtract 3 times the last digit from the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|33|{{ItG|-16}}, '''10'''|{{ItG|-32}}, '''1'''
  +
|notes=''While already covered in previous methods, it is also viable to add 10 times the last digit to the remaining digits, or add 1 time the last 2 digits to the rest.''
  +
|examples=
  +
}}
  +
{{Divisibility Table B|37|'''-11''', {{ItG|26}}|{{ItG|-27}}, 10
  +
|notes=''While already covered in previous methods, it is also viable to subtract 11 times the last digit from the remaining digits.''
  +
|examples=
  +
}}
  +
{{Divisibility Table B|39|{{ItG|-26}}, '''3'''|{{ItG|-23}}, {{ItG|16}}
  +
|notes=To check divisibility of 39, add 4 times the last digit to the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|41|'''-4''', {{ItG|37}}|{{ItG|-25}}, {{ItG|16}}
  +
|notes=Subtract 4 times the last digit from the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|43|'''-30''', {{ItG|13}}|'''-3''', 40
  +
|notes=It is recommended to subtract 30 times the last digit from the rest instead of adding 13 times the last digit to the remaining digits. Alternatively, subtract 3 times the last 2 digits from the rest.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|47|{{ItG|-33}}, {{ItG|14}}|{{ItG|-41}}, '''8'''
  +
|notes=Add 8 times the last two digits to the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|49|{{ItG|-44}}, '''5'''|{{ItG|-24}}, 25
  +
|notes=To check divisibility of 49, add 5 times the last digit to the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table End|toggle}}
   
  +
{{Divisibility Table B Header|1-digit or 2-digit Right trimming (51 ~ 101)}}
# Take 3,692,513,279 for example, <math>-3 + 692 - 513 + 279 = 455</math>
 
  +
{{Divisibility Table B|51|'''-5''', {{ItG|46}}|{{ItG|-26}}, 25
# After that, use Method 1 to determine if 455 is a multiple of 13.
 
  +
|notes=Subtract 5 times the last digit from the remaining digits.
# Take out 5 from 455 and multiply it by 4. (5 x 4 = 20)
 
  +
}}
# Add it to the remaining digits. (45 + 20 = 65)
 
  +
{{Divisibility Table B|53|{{ItG|-37}}, {{ItG|16}}|'''-9''', {{ItG|44}}
  +
|notes=Subtract 9 times the last 2 digits from the remaining digits. Alternatively, add 16 times the last digit to the rest.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|57|{{ItG|-19}}, '''40'''|{{ItG|-55}}, '''4'''
  +
|notes=Add 40 times the last digit to the remaining digits. Alternatively, add 4 times the last 2 digits to the rest.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|59|{{ItG|-53}}, '''6'''|{{ItG|-23}}, {{ItG|36}}
  +
|notes=To check divisibility of 59, add 6 times the last digit to the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|61|'''-6''', {{ItG|55}}|{{ItG|-26}}, 25
  +
|notes=Subtract 6 times the last digit from the remaining digits.
  +
}}
  +
{{Divisibility Table B|63|{{ItG|-44}}, {{ItG|19}}|{{ItG|-17}}, {{ItG|46}}
  +
|notes=None of the methods are practical except perhaps adding 19 times the last digit to the rest. Check divisibility of 7 and 9 individually instead.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|67|'''-20''', 47|'''-2''', {{ItG|65}}
  +
|notes=Subtract 20 times the last digit from the remaining digits. Alternatively, subtract 2 times the last 2 digits from the rest.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|69|{{ItG|-62}}, '''7'''|-20, {{ItG|49}}
  +
|notes=To check divisibility of 69, add 7 times the last digit to the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|71|'''-7''', {{ItG|64}}|{{ItG|-22}}, {{ItG|49}}
  +
|notes=Subtract 6 times the last digit from the remaining digits.
  +
}}
  +
{{Divisibility Table B|73|{{ItG|-51}}, {{ItG|22}}|{{ItG|-27}}, {{ItG|46}}
  +
|notes=''No methods are practical for calculating mentally. Use the alternating sum method (4-digits) first before adding 22 times the last digit to the rest.''
  +
|examples=
  +
}}
  +
{{Divisibility Table B|77|{{ItG|-23}}, {{ItG|54}}|'''-10''', {{ItG|67}}
  +
|notes=''While already covered in previous methods, it is also viable to subtract 10 times the last 2 digits from the remaining digits. It is, however, better to check the alternating sum (3-digits) directly.''
  +
|examples=
  +
}}
  +
{{Divisibility Table B|79|{{ItG|-71}}, '''8'''|{{ItG|-15}}, {{ItG|64}}
  +
|notes=To check divisibility of 79, add 8 times the last digit to the remaining digits.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|81|'''-8''', {{ItG|73}}|{{ItG|-17}}, {{ItG|64}}
  +
|notes=Subtract 6 times the last digit from the remaining digits.
  +
}}
  +
{{Divisibility Table B|83|{{ItG|-58}}, '''25'''|{{ItG|-39}}, {{ItG|44}}
  +
|notes=Add 25 times the last digit to the remaining digits. While it is not easy to calculate, there are no simpler methods.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|87|{{ItG|-26}}, {{ItG|61}}|'''-20''', {{ItG|67}}
  +
|notes=Subtract 20 times the last 2 digits from the remaining digits. While it is not easy to calculate, there are no simpler methods.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|89|-80, '''9'''|-8, {{ItG|81}}
  +
|notes=To check divisibility of 89, add 9 times the last digit to the remaining digits. Alternatively, subtract 80 times the last digit from the rest, or subtract 8 times the last 2 digits from the rest.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|91|'''-9''', {{ItG|82}}|-10, {{ItG|81}}
  +
|notes=''While already covered in previous methods, it is also viable to subtract 9 times the last digit from the remaining digits, or subtract 10 times the last 2 digits from the rest.''
  +
}}
  +
{{Divisibility Table B|93|{{ItG|-65}}, {{ItG|28}}|{{ItG|-53}}, '''40'''
  +
|notes=Add 40 times the last 2 digits to the remaining digits. While it is not easy to calculate, there are no simpler methods.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|97|{{ItG|-29}}, {{ItG|68}}|{{ItG|-32}}, {{ItG|65}}
  +
|notes=None of the methods are appreciated. See below: Left-trim.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|99|{{ItG|-89}}, '''10'''|-98, '''1'''
  +
|notes=''While already covered in previous methods, it is also viable to add 10 times the last digit to the remaining digits, or add 1 time the last two digits to the rest.''
  +
|examples=
  +
}}
  +
{{Divisibility Table B|101|'''-10''', {{ItG|91}}|'''-1''', {{ItG|81}}
  +
|notes=''While already covered in previous methods, it is also viable to subtract 10 times the last digit from the remaining digits, or subtract 1 time the last two digits from the rest.''
  +
}}
  +
{{Divisibility Table End}}
   
  +
<big> Left trim </big>
   
  +
[[File:LT ex.png|thumb|130px|right|Left Trim example]]
65 is divisible by 13. Therefore, 3,692,513,279 is also divisible by 13.
 
  +
The trick is that, if 100 divided by the number '''d''' has a remainder of '''h''', then the leftmost digit can be removed, multiplied by '''h''', shifted '''two places''' to the right, and be added from there. It can be described as the following equation:
===Divisibility by 14===
 
   
  +
<math>\mbox{if}~100 \equiv h\pmod{d},\ \mbox{then}~100a + b \equiv ha + b\pmod{d}. </math>
As 14 is the product of 2 and 7, perform divisibility checks of both 2 and 7.
 
===Divisibiltiy by 15===
 
   
  +
The same can be applied for the number 10 divided by '''d''' having a remainder '''h''', with the same method applied to shift the leftmost digit '''one place''' to the right, and then be added from there:
Check if the number is divisible by 3 and 5.
 
   
  +
<math>\mbox{if}~10 \equiv h\pmod{d},\ \mbox{then}~10a + b \equiv ha + b\pmod{d}. </math>
=== Divisibility by 16 ===
 
   
  +
Below is a list of numbers where this method can be applied. Only notable numbers will be listed here.
Same as divisibility by 8, except check if the last 4 digits are divisible by 16 rather than the last 3.
 
=== Divisibility by 18 ===
 
   
  +
{{Divisibility Table B Header|Left trimming|L}}
Check if the number is divisible by 2 and 9.
 
=== Divisibility by 19 ===
+
{{Divisibility Table B|3|1|1
  +
|notes=''It is still viable to add the first digit (times 1) to the next.''
  +
|examples=
  +
}}
  +
{{Divisibility Table B|6|-2|-2
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|7|3|2
  +
|notes=First, take out the first digit and multiply it by 3. Then, shift that digit one place to the right, and add it from there. Alternatively, take out the first digit, double it, and then add it after moving it two places right.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|8|2|4
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|9|1|1
  +
|notes=''It is still viable to add the first digit (times 1) to the next.''
  +
|examples=
  +
}}
  +
{{Divisibility Table B|11|-1|1
  +
|notes=''It is still viable to subtract the first digit (times 1) from the next.''
  +
|examples=
  +
}}
  +
{{Divisibility Table B|12|-2|4
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|13|-3|-4
  +
|notes=First, take out the first digit and multiply it by 3. Then, shift that digit one place to the right, and subtract it from there. Alternatively, take out the first digit, quadruple it, shift two places to the right, and then subtract from there.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|14|-4|2
  +
|notes=First, take out the first digit and multiply it by 2. Then, shift that digit two places to the right, and add it from there.
  +
|examples=
  +
}}
  +
{{Divisibility Table B|19|...|5
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|21|...|-5
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|32|...|4
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|33|...|1
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|34|...|-2
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|35|...|-5
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|48|...|4
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|49|...|2
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|51|...|-2
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|52|...|-4
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|53|...|-6
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|95|...|5
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|96|...|4
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|97|...|3
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|98|...|2
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|99|...|1
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table B|101|...|-1
  +
|notes=
  +
|examples=
  +
}}
  +
{{Divisibility Table End}}
  +
|}
   
  +
{| class="collapsible" style="margin:6px auto; width:100%; background:transparent; border:2px solid #AAA; padding:5px;"
To check if a number is divisible by 19, take off the last digit and double it. Add it to the remaining digits. If that number is divisible by 19, so is the original number.
 
  +
! style="text-align:left;" | <h2 style="border:none;">Combining Methods</h2>
  +
|-
  +
|
  +
This is done by testing a number's divisibility of 2 or more numbers if the divisor is a composite number that is not a square, cubic, quadratic number, etc.
   
  +
Suppose that ''d = mn'' where '''m''' and '''n''' are {{Mouseover|''relatively prime''|Relatively prime: When both numbers have the greatest common divisor of 1}}. When the above statement is true, the number '''a''' is divisible by '''d''' if and only if '''d''' is divisible by '''m''' and '''d''' is divisible by '''n'''. For example, a number is divisible by 63 if and only if 63 is divisible by both 7 and 9.
'''Example:'''
 
   
  +
Below is a list of numbers that can apply this method:
209. Take off the last digit (9) and double it (18). Add 18 to the remaining digits (20) to get 38. You can do the process again. Take off the last digit (8) and double it (16). Add 16 to the remaining digits (3) to get 19. 209 is divisible by 19.
 
 
=== Divisibility by 20 ===
 
 
==Beyond 20==
 
If the last digit of the number is 0 and the tens place is even, it's divisible by 20.
 
=== Divisibility by 21 ===
 
 
==== Method 1 ====
 
 
21 ends in 1, so you can take the last digit, multiply it by 2, and subtract it from the remaining digits of the number just like 7.
 
==== Method 2 ====
 
 
Do the test for 3 and the test for 7. It the number is divisible by both, it's divisible by 21.
 
=== Divisibility by 29 ===
 
 
To check if a number is divisible by 29, do the same as with 19 except when you take off the last digit, triple it rather than double it. This trick works with every number ending in 9. For 39 multiply it by 4, for 49 multiply it by 5, for 59 multiply it by 6 and so on.
 
=== Divisibility by 30 ===
 
If the sum of digits is a multiple of 3, and the last digit of the number is 0, then it's divisible by 30.
 
 
=== Divisibility by 32 ===
 
 
Do the same as with 16, but check that the last 5 digits are divisible by 3 rather than the last 4.
 
 
=== Divisibility by 39 ===
 
 
==== Method 1 ====
 
 
39 ends in 9, so you can do the test for 29 but this time multiply the last digit by 4 rather than 3.
 
 
==== Method 2 ====
 
 
Do the test for 13 and the test for 3. If they both turn out positive, then the original number is divisible by 39.
 
==References==
 
   
  +
{{Divisibility Table B2 Header}}
  +
{{Divisibility Table B2|6|2, 3 |36|4, 9 |58|2, 29 |82|2, 41 }}
  +
{{Divisibility Table B2|10|2, 5 |38|2, 19 |60|3, 4, 5 |84|3, 4, 7 }}
  +
{{Divisibility Table B2|12|3, 4 |39|3, 13 |62|2, 31 |85|5, 17 }}
  +
{{Divisibility Table B2|14|2, 7 |40|5, 8 |63|7, 9 |86|2, 43 }}
  +
{{Divisibility Table B2|15|3, 5 |42|2, 3, 7 |65|5, 13 |87|3, 29 }}
  +
{{Divisibility Table B2|18|2, 9 |44|4, 11 |66|2, 3, 11|88|8, 11 }}
  +
{{Divisibility Table B2|20|4, 5 |45|5, 9 |68|4, 17 |90|2, 5, 9 }}
  +
{{Divisibility Table B2|21|3, 7 |46|2, 23 |69|3, 23 |91|7, 13 }}
  +
{{Divisibility Table B2|22|2, 11 |48|3, 16 |70|2, 5, 7 |92|4, 23 }}
  +
{{Divisibility Table B2|24|3, 8 |50|2, 25 |72|8, 9 |93|3, 31 }}
  +
{{Divisibility Table B2|26|2, 13 |51|3, 17 |74|2, 37 |94|2, 47 }}
  +
{{Divisibility Table B2|28|4, 7 |52|4, 13 |75|3, 25 |95|5, 19 }}
  +
{{Divisibility Table B2|30|2, 3, 5 |54|2, 27 |76|4, 19 |96|3, 32 }}
  +
{{Divisibility Table B2|33|3, 11 |55|5, 11 |77|7, 11 |98|2, 49 }}
  +
{{Divisibility Table B2|34|2, 17 |56|7, 8 |78|2, 3, 13|99|9, 11 }}
  +
{{Divisibility Table B2|35|5, 7 |57|3, 19 |80|5, 16 |100|4, 25 }}
  +
{{Divisibility Table End}}
  +
{{Divisibility Table B2 Header|mobile}}
  +
{{Divisibility Table B2|6|2, 3 |58|2, 29 }}
  +
{{Divisibility Table B2|10|2, 5 |60|3, 4, 5 }}
  +
{{Divisibility Table B2|12|3, 4 |62|2, 31 }}
  +
{{Divisibility Table B2|14|2, 7 |63|7, 9 }}
  +
{{Divisibility Table B2|15|3, 5 |65|5, 13 }}
  +
{{Divisibility Table B2|18|2, 9 |66|2, 3, 11}}
  +
{{Divisibility Table B2|20|4, 5 |68|4, 17 }}
  +
{{Divisibility Table B2|21|3, 7 |69|3, 23 }}
  +
{{Divisibility Table B2|22|2, 11 |70|2, 5, 7 }}
  +
{{Divisibility Table B2|24|3, 8 |72|8, 9 }}
  +
{{Divisibility Table B2|26|2, 13 |74|2, 37 }}
  +
{{Divisibility Table B2|28|4, 7 |75|3, 25 }}
  +
{{Divisibility Table B2|30|2, 3, 5 |76|4, 19 }}
  +
{{Divisibility Table B2|33|3, 11 |77|7, 11 }}
  +
{{Divisibility Table B2|34|2, 17 |78|2, 3, 13}}
  +
{{Divisibility Table B2|35|5, 7 |80|5, 16 }}
  +
{{Divisibility Table B2|36|4, 9 |82|2, 41 }}
  +
{{Divisibility Table B2|38|2, 19 |84|3, 4, 7 }}
  +
{{Divisibility Table B2|39|3, 13 |85|5, 17 }}
  +
{{Divisibility Table B2|40|5, 8 |86|2, 43 }}
  +
{{Divisibility Table B2|42|2, 3, 7 |87|3, 29 }}
  +
{{Divisibility Table B2|44|4, 11 |88|8, 11 }}
  +
{{Divisibility Table B2|45|5, 9 |90|2, 5, 9 }}
  +
{{Divisibility Table B2|46|2, 23 |91|7, 13 }}
  +
{{Divisibility Table B2|48|3, 16 |92|4, 23 }}
  +
{{Divisibility Table B2|50|2, 25 |93|3, 31 }}
  +
{{Divisibility Table B2|51|3, 17 |94|2, 47 }}
  +
{{Divisibility Table B2|52|4, 13 |95|5, 19 }}
  +
{{Divisibility Table B2|54|2, 27 |96|3, 32 }}
  +
{{Divisibility Table B2|55|5, 11 |98|2, 49 }}
  +
{{Divisibility Table B2|56|7, 8 |99|9, 11 }}
  +
{{Divisibility Table B2|57|3, 19 |100|4, 25 }}
  +
{{Divisibility Table End}}
  +
|}
  +
{| class="collapsible hidden" style="margin:6px auto; width:100%; background:transparent; border:2px solid #AAA; padding:5px;"
  +
! style="text-align:left;" | <h2 style="border:none;">References</h2>
  +
|-
  +
|
 
<references />
 
<references />
  +
|}
  +
{{Important Pages}}
 
[[Category:Important Pages]]
 
[[Category:Important Pages]]

Revision as of 14:12, 4 January 2018

For explanation of each divisibility rules sorted by order, see List of Divisibility Rules.

Divisibility rules are shorthand ways of division to tell if one number is divisible or not. They help tell whether the specific number you are looking for is prime or not. The many divisibility rules help many mathematicians and geniuses determine prime numbers, even if the number is beyond big.

Let's look at some divisibility rules:

Basic Rules

The following rules are elementary checks:

Divisibility by 1

1

Divisibility Rule 1

Every integer is divisible by one.  Example: 1289 is divisible by one, and 14461 is divisible by one.

Proof:
There is no need for a proof here.  Any number is divisible by one.  This rule does not apply to differentiate prime from composite numbers.

Examining the last n digits

Ending Digit

Examining the last n digits

Simply examine the last n digits if the divisor can divide 10n with no remainder.

As such:

  • Examining 1 ending digit:
  1. Every integer which ends with 0, 2, 4, 6 or 8 is divisible by two.  
    Example:65156151594 is divisible by two because the units digit is 4, and 1597534568852 is divisible by two because the units digit is 2.
  2. A number is divisible by 5 if and only if the last digit is a 0 or 5.
    Example:41645 is divisible by five because the units digit is 5, and 124150 is divisible by five because the units digit is 0.
  3. If the last digit of the number is 0, it is divisible by 10.
    Example:158375209580 is divisible by 10 because the last digit is 0.
  • Examining 2 ending digits:
  1. A number is divisible by four if and only if its last two digits of the number are divisible by four.
    Example:156128 is divisible by four, and 6416 is divisible by four. The last two digits are 28 and 16, respectively, both of which are divisible by 4.
  2. For an integer to be divisible by 20, the last two digits need to end in 20, 40, 60, 80, and 00, all of which are divisible by 20.
    Example:913580 is divisible by 20.
  3. For an integer to be divisible by 25, the last two digits need to end in 25, 50, 75, and 00, all of which are divisible by 25.
    Example:143475 is divisible by 25.
  4. For an integer to be divisible by 50, the last two digits need to end in 50 and 00, both of which are divisible by 50.
  5. For an integer to be divisible by 100, the last two digits need to end in 00.
  • Examining 3 ending digits:
  1. A number is divisible by eight if and only if its last three digits of the number are divisible by eight. [1]
    Example:4313586 is divisible by 8 since the last three digits are 586, divisible by 8.
  2. For an integer to be divisible by 40, the last three digits must be divisible by 40.
  • Examining 4 ending digits:
  1. A number is divisible by 16 if and only if its last four digits of the number are divisible by 16.
    Example:28112 is divisible by 16 since the last four digits are 8112, divisible by 16.
  2. For an integer to be divisible by 80, the last four digits must be divisible by 80.
  • Examining 5 ending digits:
  1. A number is divisible by 32 if and only if its last five digits of the number are divisible by 32.
  2. For an integer to be divisible by 160, the last five digits must be divisible by 160.
  • Examining 6 ending digits:
  1. A number is divisible by 64 if and only if its last six digits of the number are divisible by 64.
  2. For an integer to be divisible by 320, the last six digits must be divisible by 320.

Proof:
First of all, let's suppose that 10n is divisible by d, expressed in an equation: . Then, let a be an integer with k number of digits, and assume that k is larger than n: . The largest digit of a is ak, and the smallest digit is a1.

Due to this, a is divisible by d if and only if the last n digits of a is divisible by d.[2]

Adding blocks of digits

Digit Sum

Digit sum

Starting from the right to left, sum up all the digits in blocks of n digits. This works for the following numbers:

  • 1-digit blocks
  • 3: To put it simpler, add up all the digits and examine if the number is divisible by 3.
    Example: Examining the divisibility of 12423 by 3 — By adding all the digits together, we get 1 + 2 + 4 + 2 + 3 = 12. Since 12 is divisible by 3, the test is positive.
  • 9: Add all the digits together. The only step different is to check if it is the multiple of 9 instead of 3.
    Example: Examining the divisibility of 14625 by 9 — By adding all the digits together, we get 1 + 4 + 6 + 2 + 5 = 18. Since 18 is divisible by 9, the test is positive.
  • 2-digit blocks
  • 11: Add up the digits in groups of two from right to left and check if the number is divisible by 11.
    Example: Examining the divisibility of 19074 by 11 — By adding groups of digits from right to left, we get 74 + 90 + 1 = 165. Since 165 is divisible by 11, the test is positive (if needed, one can perform the test many times).
  • 33: Add up the digits in groups of two from right to left and check if the number is divisible by 33.
  • 99: Add up the digits in groups of two from right to left and check if the number is divisible by 99.
  • 3-digit blocks
  • 27: Add up the digits in groups of three from right to left and check if the number is divisible by 27.
    Example: Examining the divisibility of 34803 by 27 — By adding groups of digits from right to left, we get 803 + 34 = 837. 837 is divisible by 27[A].
  • 37: Add up the digits in groups of three from right to left and check if the number is divisible by 37.
    Example: Examining the divisibility of 24215797 by 37 — By adding groups of digits from right to left, we get 797 + 215 + 24 = 1036. Applying the trick again, 36 + 1 = 37. Since 37 is divisible by 37, the test is positive[A].
  • 4-digit blocks
  • 101: Add up the digits in groups of four from right to left and check if the number is divisible by 37.

Alternating Sum

Alt Sum

Alt sum

First, sort the numbers in groups of n digits from right to left. Alternate between adding and subtracting them. In other words, after adding the first group, continue subtracting the second group, adding the third group, subtracting the fourth group, adding the fifth group, and so on. This is called the alternating sum.[3] This works for the following numbers:

  • 1-digit blocks
  • 11: From right to left, add the rightmost digit, then subtract the 2nd-to-right digit, add the 3rd-to-right digit, then subtract the 4th-to-right digit, and so on. This can be further simplified by adding all the digits in odd places and all the digits in even places separately, and then find the difference of the two.
    Example:For the divisibility of 527901 by 11, we first add up the digits in odd places counting from the right (in this case, 2+9+1=12), the digits in even places (in this case, 5+7+0=12). The difference is 12 - 12 = 0; therefore 527901 is divisible by 11.
  • 2-digit blocks
  • 101: Add up the first group of 2 digits from the right, subtract the second group, add the third group, subtract the fourth group, and so on.
    Example:For the divisibility of 146147 by 101, we find the alternating sum: 47 - 61 + 14 = 0. Since 0 is divisible by 101, the test is positive.
  • 3-digit blocks
  • 7: Find the alternating sum in groups of 3 digits from right to left.
    Example:For the divisibility of 1702906247 by 7, group the numbers into blocks of three (247, 906, 702, 1) and form the alternating sum (247 - 906 + 702 - 1 = 42). Since 42 = 7 * 6, 42 is divisible by 7, thus 1702906247 is divisible by 7.
  • 13: Find the alternating sum in groups of 3 digits from right to left.
    Example:Take 3,692,513,279 for example, the alternating sum is -3 + 692 - 513 + 279 = 455[A]. 455 is divisible by 13, and therefore 3,692,513,279 is divisible by 13.
  • 77: Find the alternating sum in groups of 3 digits from right to left. 77 is the product of 7 and 11.
  • 91: Find the alternating sum in groups of 3 digits from right to left. 91 is the product of 7 and 13.
  • 4-digit blocks
  • 73: Find the alternating sum in groups of 4 digits from right to left.

Note: A. With the 3-digit digit sum method, if the result is still not easy to determine, the "right trim method" below can be used to further examine it.

Advanced Rules

Right trim

For the number a to test divisibility by d, take off the last digit, multiply it by x, and then add it to all of the remaining digits on the left.

By the elementary number theory results, if the greatest common divisor of d and 10 is 1 (i.e. the number d has the last digit of 1, 3, 7, or 9), there will be a number x that can allow . The term for this sort of number is named inverse of 10 modulo d, and it can be written as . This would allow the number to be trimmed from the right by 1 digit, multiplied by x, and then be added to the remaining digits.

Similarly, there also exist a number that can allow , and it can be written as . The number would then be able to be trimmed, multiplied by x, and then be added to the remaining digits.

Examples:

For the first example, to test divisibility of 3409 by 7:
RT ex1

Testing if 3,409 is divisible by 7.

Since 10x2 ≡ -1 (mod 7), we can take out the last digit, multiply it by 2, and then subtract it from the remaining digits. Therefore:

  1. Take 9 from 3409.
  2. Multiply 9 by 2 (9*2=18)
  3. Subtract the doubled digit to the remaining number (340-18=322)
  4. Repeat the process, this time take 2 from 322.
  5. Multiply 2 by 2 (2*2=4)
  6. Subtract the doubled digit to the remaining number (32-4=28)
  7. 28 is divisible by 7, so 3409 is divisible by 7. (The answer of 3409 divided by 7 is 487)
Take 85969, for another example, to test divisibility of 13:
RT ex2

Testing if 85,969 is divisible by 13.

Since 10x4 ≡ 1 (mod 13), we can take out the last digit, multiply it by 4, and then add it to the remaining digits. Therefore:

  1. Take out 9 from 85969.
  2. Multiply if by four. (9 x 4 = 36)
  3. Add it to the remaining digits. (8596 + 36 = 8632)
  4. Take out 2 from 8632 and multiply it by four. (2 x 4 = 8)
  5. Add it to the remaining digits. (863 + 8 = 871)
  6. Take out 1 from 871 and multiply it by four. (1 x 4 = 4)
  7. Add it to the remaining digits. (87 + 4 = 91)
  8. 91 is divisible by 13, so 85969 is also divisible by 13.

Full list below 101

Any inverse of 10 modulo d or 100 modulo d will work, thus there are two methods for the former, and two methods for the latter to do the trimming. The method can be applied to the following numbers:

1-digit
R trim
2-digit
R trim
3 -2, 1 -2, 1
7 -2, 5 -3, 4
9 -8, 1 -8, 1
11 -1, 10 -10, 1
13 -9, 4 -10, 3
17 -5, 12 -9, 8
19 -17, 2 -15, 4
21 -2, -19 -17, 4
23 -16, 7 -20, 3
27 -8, 19 -17, 10
29 -26, 3 -20, 9
31 -3, 28 -22, 9
33 -16, 10 -32, 1
37 -11, 26 -27, 10
39 -26, 3 -23, 16
41 -4, 37 -25, 16
43 -30, 13 -3, 40
47 -33, 14 -41, 8
49 -44, 5 -24, 25
1-digit
R trim
2-digit
R trim
51 -5, 46 -26, 25
53 -37, 16 -9, 44
57 -19, 40 -55, 4
59 -53, 6 -23, 36
61 -6, 55 -26, 25
63 -44, 19 -17, 46
67 -20, 47 -2, 65
69 -62, 7 -20, 49
71 -7, 64 -22, 49
73 -51, 22 -27, 46
77 -23, 54 -10, 67
79 -71, 8 -15, 64
81 -8, 73 -17, 64
83 -58, 25 -39, 44
87 -26, 61 -20, 67
89 -80, 9 -8, 81
91 -9, 82 -10, 81
93 -65, 28 -53, 40
97 -29, 68 -32, 65
99 -89, 10 -98, 1
101 -10, 91 -1, 81

Left trim

LT ex

Left Trim example

The trick is that, if 100 divided by the number d has a remainder of h, then the leftmost digit can be removed, multiplied by h, shifted two places to the right, and be added from there. It can be described as the following equation:

The same can be applied for the number 10 divided by d having a remainder h, with the same method applied to shift the leftmost digit one place to the right, and then be added from there:

Below is a list of numbers where this method can be applied. Only notable numbers will be listed here.

Shift right
1 place
Shift right
2 places
3 1 1
6 -2 -2
7 3 2
8 2 4
9 1 1
11 -1 1
12 -2 4
13 -3 -4
14 -4 2
19 ... 5
21 ... -5
32 ... 4
33 ... 1
34 ... -2
35 ... -5
48 ... 4
49 ... 2
51 ... -2
52 ... -4
53 ... -6
95 ... 5
96 ... 4
97 ... 3
98 ... 2
99 ... 1
101 ... -1

Combining Methods

This is done by testing a number's divisibility of 2 or more numbers if the divisor is a composite number that is not a square, cubic, quadratic number, etc.

Suppose that d = mn where m and n are relatively prime. When the above statement is true, the number a is divisible by d if and only if d is divisible by m and d is divisible by n. For example, a number is divisible by 63 if and only if 63 is divisible by both 7 and 9.

Below is a list of numbers that can apply this method: