quinta-feira, 15 de maio de 2014

DETAILS OF THE SECOND MOURA VELHO RULE


This post is designed to clarify details of the second Moura Velho rule of divisibility by 7 presented in a recent video.

Changing what must be changed, this rule works also to test divisibility by 11 and 13.


THE ALGORITHMS


This rule works through the coordinated application of two algorithms to the pairs of digits of N, moving alternately from right to left or vice-versa. The final result (FR) is a two-digit number; if 7|FR then 7|N. It makes use of the inverse additive mod 7 that corresponds to the difference between a given number and the next higher multiple of 7.

The use of common language simplifies the application of the rule because, as an example:

─ 26 mod 7 ≡ 2 may be described this way: 26 to 28 equals 2.

Algorithm 1)

N = abc,def
a’ ≡ ( ─ cd mod 7 + a ) mod 7, cd is eliminated (replaced by zeroes) → a’b00ef

Algorithm 2)

N = a’b00ef
e’ ≡ ( ─ a’b mod 7 + e ), a’b is also eliminated (replaced by zeroes) → 0000e’f;
If 7|e’f (FR) then 7|N


WHY IT WORKS


Algorithm 1)

─ cd mod 7 ≡ 6cd; 6cd is added to the place value of the thousands, resulting in an addition of 6,000 cd; as cd is eliminated, 1 cd is subtracted and 6,000 cd ─ cd = 5,999 cd.
As 7|5,999 the procedure preserves the value of N in mod 7. Observe that, as cd is eliminated (subtracted), two zero digits must replace cd.

 Algorithm 2)

Restricting N to N = a’b00e follows that ─ a’b mod 7 ≡ 6a’b mod 7 that is added to the ones digit. As a’b is eliminated (subtracted) and occupies the place value of the thousands there is a subtraction of 1,000 a’b; and the procedure results in: ─ 1,000 a’b + 6 a’b = ─ 994 a’b.
As 7|994, the procedure preserves the value of N mod 7, observing that a’b must be replaced by zeroes.

Conclusion: The coordinated and repetitive application of the two algorithms reduces N to a two-digit number, preserving the value of N in mod 7. If 7|FR (final result) then 7|N.

HOW IT WORKS


N = 675,934; ( ─ 59 mod 7 + 6 ) mod 7 ≡ 3; 370034;
( ─ 37 mod 7 + 3 ) mod 7 ≡ 1; 000014
7|14 and 7|N
For larger numbers, the pairs of digits of N must be counted, including as a pair the eventual isolated leftmost digit.
Let n = number of pairs of N.
If n mod 3 ≡ 1, the procedure begins with the application of the second algorithm to the first pair of digits of N.
If n mod 3 ≠ 1, the procedure begins with the application of the first algorithm to the second pair of digits of N.
This measure ensures that N is always reduced to a two-digit number.
Note: Mental calculations are extremely quick without the use of any type of annotation. The annotations were made ​​for the sole purpose of illustrating the application of the rule.

Examples:

N = 43,816,248,324 → 4|38|16|24|83|24

n = 6; 6 mod 3 ≡ 0; the procedure begins with the application of the first algorithm to the second pair of digits.

( ─ 38 mod 7 + 0 ) 4; → 440016248324; ( ─ 44 mod 7 + 1 ) 6; → 000066248324;

( ─ 66 mod 7 + 8 ) mod 7 ≡ 5; → 000000245324; ( ─ 53 mod 7 + 2 ) mod 7 ≡ 5; → 0000540024;

( ─ 54 mod 7 + 2 ) mod 7 ≡ 4; → 44; 7Ɨ44 and 7ƗN


THE REMAINDER


The application of this rule always ends at the ultimate or the penultimate pair of digits. If it ends at the ultimate pair of digits, the remainder is equivalent to FR mod 7. Otherwise, the remainder is equivalent to 2 . RF mod 7.

In the case of N = 43,816,248,234 the application of the rule ended at the ultimate pair of digits and the final result (FR) is 44. Then 44 mod 7 ≡ 2 is the remainder of the division of N by 7.

Additional example:

N = 129,325,634 → 1|29|32|56|34
( ─ 1 mod 7 + 3 ) mod 7 ≡ 2; 029225634; ( ─ 22 mod 7 + 2 ) mod 7 ≡ 1;
19005634; ( ─ 19 mod 7 + 5 ) mod 7 ≡ 0; 00000634; ( ─ 34 mod 7 + 0 ) mod 7 ≡ 1;
00001600; 7Ɨ16 and 7ƗN;


 Remainder = ( 2 . 16 ) mod 7 ≡ 4; the application of the rule ended at the penultimate pair of digits. This is the reason why the final result (FR) was multiplied by 2 mod 7.

Nenhum comentário:

Postar um comentário