Divisibility of Numbers

Embed Size (px)

Citation preview

  • 8/3/2019 Divisibility of Numbers

    1/3

    The concept of divide and conquer, derived from the Latin phrase Divide et impera, was putinto use effectively by everyone from Caesar to Napoleon to the British in India. EvenMuammar Gaddafi tried using it but as the latest news events show us he wasnt veryeffective at gaining from it. Dividing rather divisibility rules to be specific can come inreally handy at times in solving problems based on Number Systems.

    The standard rules which nearly all of us are very comfortable with are the ones for 2 n and5n all that one needs to do is look at the last n digits of the number. If the last n digits of anumber are divisible by 2n or 5n, then the number is divisible by 2n or 5n and vice versa. Forrules about a few other types of numbers, I suggest that you read on.

    Funda 1

    For checking divisibility by p, which is of the format of 10 n 1, sum of blocks of size n needsto be checked (blocks should be considered from the least significant digit, or the right side). Ifthe sum is divisible by p, then the number is divisible by p.

    Example 1,

    Check if a number (N = abcdefgh) is divisible by 9

    9 is 101 1

    Sum of digits is done 1 at a time = a + b + c + d + e + f + g + h = X

    If X is divisible by 9, N is divisible by 9

    Also, N is divisible by all factors of 9. Hence the same test works for 3.

    Example 2,

    Check if a number (N = abcdefgh) is divisible by 99

    99 is 102 1

    Sum of digits is done 2 at a time = ab + cd + ef + gh = X

    If X is divisible by 99, N is divisible by 99

    Also, N is divisible by all factors of 99. Hence the same test works for 9, 11 and others.

    Example 3,

    Check if a number (N = abcdefgh) is divisible by 999

    999 is 103 1

    Sum of digits is done 3 at a time = ab + cde + fgh = X

    If X is divisible by 999, N is divisible by 999

  • 8/3/2019 Divisibility of Numbers

    2/3

    Also, N is divisible by all factors of 999. Hence the same test works for 27, 37 and others.

    Funda 2

    For checking divisibility by p, which is of the format of 10 n + 1, alternating sum of blocks ofsize n needs to be checked (blocks should be considered from the least significant digit, orthe right side). If the alternating sum is divisible by p, then the number is divisible by p.

    (Alternating Sum: Sum of a given set of numbers with alternating + and signs. Since we areusing it to just check the divisibility, the order in which + and signs are used is of noimportance.)

    Example 1,

    Check if a number (N = abcdefgh) is divisible by 11

    11 is 101 + 1

    Alternating sum of digits is done 1 at a time = a b + c d + e f + g h = X

    If X is divisible by 11, N is divisible by 11

    Example 2,

    Check if a number (N = abcdefgh) is divisible by 101

    101 is 102 + 1

    Alternating sum of digits is done 2 at a time = ab cd + ef gh = X

    If X is divisible by 101, N is divisible by 101

    Example 3,

    Check if a number (N = abcdefgh) is divisible by 1001

    1001 is 103 + 1

    Sum of digits is done 3 at a time = ab cde + fgh = X

    If X is divisible by 1001, N is divisible by 1001

    Also, N is divisible by all factors of 1001. Hence the same test works for 7, 11, 13 andothers.

    Funda 3: Osculator/seed number method

  • 8/3/2019 Divisibility of Numbers

    3/3

    For checking divisibility by p,

    Step 1: Figure out an equation such that

    p n = 10m 1

    If we have this equation, the osculator/seed number for p will be -+m. (-m in case of 10m+1and +m in case of 10m 1)

    Step 2: Remove the last digit and multiply it with the seed number.

    Step 3: Add the product with the number that is left after removing the last digit.

    Step 4: Repeat Steps 2 and 3 till you get to a number which you can easily check that whetheror not it is divisible by p.

    Example,

    Check whether 131537 is divisible by 19 or not.

    191 = 102 1 (Seed number is +2)

    131537 13153+72=131671316+72=1330133+02=133

    133 is divisible by 19

    131537 is divisible by 19

    I hope that these divisibility rules will enable you to divide and conquerfew of the NumberSystems problems that you encounter during your preparation.