kb/data/en.wikipedia.org/wiki/Divisibility_rule-5.md

6.2 KiB
Raw Blame History

title chunk source category tags date_saved instance
Divisibility rule 6/8 https://en.wikipedia.org/wiki/Divisibility_rule reference science, encyclopedia 2026-05-05T08:13:56.367542+00:00 kb-cron

Another digit grouping method of divisibility by 7 Method This method determines whether an integer is divisible by 7 by grouping digits in sets of three: Starting from the right (units place), divide the number into groups of three digits. If necessary, prepend leading zeros to complete the leftmost group. Starting from the rightmost group, alternately add and subtract the groups moving left. That is, subtract the second group from the first, add the third, subtract the fourth, and so on. Evaluate the resulting sum. If the result is divisible by 7, then the original number is divisible by 7; otherwise, it is not. Example To test the number 10,517,815: Group the digits:

010 | 517 | 815 Apply alternating operations:

815 517 + 010 = 308 Since 308 is divisible by 7, the original number is also divisible by 7. Proof of correctness This method is based on modular arithmetic. Observe that:

1000 ≡ 1 (mod 7) since 1000 leaves a remainder of 6 when divided by 7, and 6 ≡ 1 (mod 7). Any integer can be expressed as a sum of multiples of powers of 1000:

N = a₀ + a₁·1000 + a₂·1000² + a₃·1000³ + … Reducing modulo 7:

N ≡ a₀ a₁ + a₂ a₃ + … (mod 7) Thus, the alternating sum of the three-digit groups is congruent to the original number modulo 7. Therefore, the original number is divisible by 7 if and only if this alternating sum is divisible by 7.

=== Divisibility by 11 === Method In order to check divisibility by 11, consider the alternating sum of the digits. For example with 907,071:

    9
    
    0
    +
    7
    
    0
    +
    7
    
    1
    =
    22
    =
    2
    ×
    11
    ,
  

{\displaystyle 9-0+7-0+7-1=22=2\times 11,}

so 907,071 is divisible by 11. We can either start with

    
  

{\displaystyle -}

or

    +
  

{\displaystyle +}

since multiplying the whole by

    
    1
  

{\displaystyle -1}

does not change anything. Proof of correctness of the method Considering that

    10
    ≡
    
    1
    
      mod
      
        1
      
    
    1
  

{\displaystyle 10\equiv -1{\bmod {1}}1}

, we can write for any integer:

            a
            
              n
            
          
          
            a
            
              n
              
              1
            
          
          .
          .
          .
          
            a
            
              1
            
          
          
            a
            
              0
            
          
        
        ¯
      
    
    =
    
      ∑
      
        i
        =
        0
      
      
        n
      
    
    
      a
      
        i
      
    
    
      10
      
        i
      
    
    ≡
    
      ∑
      
        i
        =
        0
      
      
        n
      
    
    (
    
    1
    
      )
      
        i
      
    
    
      a
      
        i
      
    
    
      mod
      
        1
      
    
    1.
  

{\displaystyle {\overline {a_{n}a_{n-1}...a_{1}a_{0}}}=\sum _{i=0}^{n}a_{i}10^{i}\equiv \sum _{i=0}^{n}(-1)^{i}a_{i}{\bmod {1}}1.}

=== Divisibility by 13 === Remainder Test 13 (1, 3, 4, 1, 3, 4, cycle goes on.) If you are not comfortable with negative numbers, then use this sequence. (1, 10, 9, 12, 3, 4) Multiply the right most digit of the number with the left most number in the sequence shown above and the second right most digit to the second left most digit of the number in the sequence. The cycle goes on. Example: What is the remainder when 321 is divided by 13? Using the first sequence, Ans: 1 × 1 + 2 × 3 + 3 × 4 = 17 Remainder = 17 mod 13 = 9 Example: What is the remainder when 1234567 is divided by 13? Using the second sequence, Answer: 7 × 1 + 6 × 10 + 5 × 9 + 4 × 12 + 3 × 3 + 2 × 4 + 1 × 1 = 178 mod 13 = 9 Remainder = 9 A recursive method can be derived using the fact that

    10
    =
    
    3
    
      mod
      
        1
      
    
    3
  

{\displaystyle 10=-3{\bmod {1}}3}

and that

      10
      
        
        1
      
    
    =
    4
    
      mod
      
        1
      
    
    3
  

{\displaystyle 10^{-1}=4{\bmod {1}}3}

. This implies that a number is divisible by 13 iff removing the first digit and subtracting 3 times that digit from the new first digit yields a number divisible by 13. We also have the rule that 10 x + y is divisible iff x + 4 y is divisible by 13. For example, to test the divisibility of 1761 by 13 we can reduce this to the divisibility of 461 by the first rule. Using the second rule, this reduces to the divisibility of 50, and doing that again yields 5. So, 1761 is not divisible by 13. Testing 871 this way reduces it to the divisibility of 91 using the second rule, and then 13 using that rule again, so we see that 871 is divisible by 13.

== Beyond 30 == Divisibility properties of numbers can be determined in two ways, depending on the type of the divisor. Alternatively the tests for divisibility can be grouped into tests examining the ending digits, taking the sum of the digits, taking an alternating sum of digits, trimming from the right, trimming from the left and factoring the divisor.