VEDIC MATHEMATICS : Divisibility T. K. Prasad http://www.cs.wright.edu/~tkprasad Prasad Divisibility 1 Divisibility • A number n is divisible by f if there exists another number q such that n = f * q. – f is called the factor and q is called the quotient. • • • • Prasad 25 is divisible by 5 6 is divisible by 1, 2, and 3. 28 is divisible by 1, 2, 4, 7, 14, and 28. 729 is divisible by 3, 9, and 243. Divisibility 2 Divisibility by numbers • Divisibility by 1 – Every number is divisible by 1 and itself. • Divisibility by 2 – A number is divisible by 2 if the last digit is divisible by 2. • Informal Justification (for 3 digit number): pqr = p * 100 + q * 10 + r Both 100 and 10 are divisible by 2. Prasad Divisibility 3 (cont’d) • Divisibility by 4 – A number is divisible by 4 if the number formed by last two digits is divisible by 4. • Informal Justification (for 3 digit number): pqr = p * 100 + q * 10 + r 100 is divisible by 4. • Is 2016 a leap year? • YES! Prasad Divisibility 4 (cont’d) • Divisibility by 5 – A number is divisible by 5 if the last digit is 0 or 5. • Informal Justification (for 4 digit number): apqr = a * 1000 + p * 100 + q * 10 + r 0, 5, 10, 100, and 1000 are divisible by 5. • Is 2832 divisible by 5? • NO! Prasad Divisibility 5 (cont’d) • Divisibility by 8 – A number is divisible by 8 if the number formed by last three digits is divisible by 8. • Informal Justification (for 4 digit number): apqr = a * 1000 + p * 100 + q * 10 + r 1000 is divisible by 8. • Is 2832 divisible by 8? • YES! Prasad Divisibility 6 (cont’d) • Divisibility by 3 – A number is divisible by 3 if the sum of all the digits is divisible by 3. • Informal Justification (for 3 digit number): pqr = p * (99+1) + q * (9+1) + r 9 and 99 are divisible by 3. • Is 2832 divisible by 3? • YES because (2+8+3+2=15) is, (1+5=6) is …! Prasad Divisibility 7 (cont’d) • Divisibility by 9 – A number is divisible by 9 if the sum of all the digits is divisible by 9. • Informal Justification (for 3 digit number): pqr = p * (99+1) + q * (9+1) + r 9 and 99 are divisible by 9. • Is 12348 divisible by 9? • YES, because (1+2+3+4+8=18) is, (1+8=9) is, …! Prasad Divisibility 8 (cont’d) • Divisibility by 11 – A number is divisible by 11 if the sum of the even positioned digits minus the sum of the odd positioned digits is divisible by 11. • Informal Justification (for 3 digit number): pqr = p * (99+1) + q * (11-1) + r 11 and 99 are divisible by 11. • Is 12408 divisible by 11? • YES, because (1-2+4-0+8=11) is, (1-1=0) is, …! Prasad Divisibility 9 (cont’d) • Divisibility by 7 – Unfortunately, the rule of thumb for 7 is not straightforward and you may prefer long division. – However here is one approach: • Divisibility of n by 7 is unaltered by taking the last digit of n, subtracting its double from the number formed by removing the last digit from n. • 357 => 35 – 2*7 => 21 Prasad Divisibility 10 Is 204379 divisible by 7? 204379 => 20437 – 18 => 20419 => 2041 – 18 => 2023 => 202 – 6 => 196 => 19 – 12 => 7 Prasad Divisibility 11 (cont’d) • Informal Justification – A multi-digit number is 10x+y (e.g., 176 is 17*(10)+6). – 10x+y is divisible by 7 if and only if 20x+2y is divisible by 7. (2 and 7 are relatively prime). – Subtracting 20x+2y from 21x does not affect its divisibility by 7, because 21 is divisible by 7. – But (21x – 20x – 2y) = (x – 2y). – So (10x+y) is divisible by 7 if and only if (x-2y) is divisible by 7. Prasad Divisibility 12