segunda-feira, 26 de maio de 2014

DIVISIBILITY BY 7 - A DIFFERENT APPROACH


AUTHOR: SILVIO MOURA VELHO
 (INDEPENDENT RESEARCHER)

The History of the Theory of Numbers records the creation of various mathematical rules to check whether a number is divisible by 7, but does not record the creation of a single rule for divisibility by 7, according to the following definition:
“A divisibility rule is a shorthand way of determining whether a given number is divisible by a fixed divisor without performing the division, usually by examining its digits.” (Wikipedia)

At this point, it is useful to add this definition: “A mathematical rule is a method or procedure that describes how to solve a problem.” (Pennsylvania Department of Education Standards Aligned Systems)

If the above-mentioned definitions are correct, only mathematical rules applied quickly (shorthand way) fit the definition of divisibility rule.

The famous north American writer of mathematical issues, Martin Gardner, who is considered "the best friend of Mathematics" and wrote during 25 years the "Mathematical Games" column for the magazine "Scientific American", in his book "Unexpected Hanging" after having addressed the matter divisibility rules, expressed himself this way :

“The reader has surely noticed a singular omission from the foregoing rules. How does one test for 7, the divine number of medieval numerology? It is the only digit for which no one has yet found a simple rule. This disorderly behavior on the part of 7 has long fascinated students of number theory. Dozens of curious 7 tests have been devised, all seemingly unrelated to one another; all, unfortunately, are almost as time-consuming as the orthodox division procedure.”

This page: http://en.wikipedia.org/wiki/Divisibility_rule presents a significant variety of mathematical rules used to check whether a number is divisible by 7, but none of those rules fit the specific definition of "divisibility rule" contained in the referenced page.

All such rules are applied very slowly and move away from the specific definition of divisibility rule, although they are mathematical rules.

The first record of a mathematical rule for divisibility by 7 is mentioned in the Talmud, the Jewish holy book, according to historians. This means that the first draft of a rule of divisibility by 7 began approximately two millennia ago. As until nowadays the mathematical community is divided over the existence or not of a rule of divisibility by 7, the conclusion is that, although elementary, this is a very difficult problem.

Some mathematicians reveal sometimes as a trick, sometimes as a rule, a procedure that well analyzed is not one thing nor the other. 

Let us see how Martin Gardner refers to this procedure, which is disclosed in the most math sites:

 “A bizarre 7 test, attributed to D.S. Spence, appeared in 1956 in The Mathematical Gazette (October, page 215). The method goes back to 1861; see L.E. Dickson, History of The Theory Of Numbers, Vol. 1, page 339, where it is credited to A. Zbikovski of Russia.) Remove the last digit, double it, subtract it from the truncated original number and continue doing this until one digit remains. The original number is divisible by 7 if and only if the final digit is 0 or 7.”

In fact, this test is now used to reduce the number tested to a two-digit number.

The procedure cannot be considered a trick because the explanation of why it works is of an extraordinary elementarity: the double of one-digit number (place value of tens or hundreds and tens) always results with that digit (place value of the ones) a multiple of 7.

Examples: 1 . 2 = 2 → 21; 2 . 2 = 4 → 42; 3 . 2 = 6 → 63 … 6 . 2 = 126; 8 . 2 = 16 → 168 etc.

So the “secret” of the procedure consists in successively subtract multiples of 7 of the original number; if after this sequence of subtractions the result is a number multiple of 7 it is evident that the tested number is a multiple of 7. A trick without a secret is not a trick.

THE PROCEDURE                          PARALLEL PROCEDURE
  
   N = 23,964                                           N = 23,964
             ─ 84 → 7|84                                       ─ 14 → 7|14          
         23,880                                                 23,950                            ─ 1,680 → 7|1,680                                ─ 350 → 7|350
         22,200                                                 23,600                        
        ─ 4,200                                              ─  5,600 → 7|5,600 
         18,000                                                 18,000

Elimingating the zeroes the result in both cases is 18.
7Ɨ18 and 7ƗN

It is important to notice that the procedure consists of successively subtract multiples of 7 of the tested number, until it is reduced to a two-digit number.
 
The parallel procedure excludes the multiplication by two; it needs only the deduction of the digit that forms a multiple of 7 with the excluded digit. It is simpler and possibly quicker, although it eliminates only one digit each time. Scholars did not approve this procedure evidently because its simplicity cannot delude anyone.

The procedure is undoubtedly a mathematical rule to test the divisibility of a number by 7, but because its application is approximately as slow as performing the division, it does not fit the specific definition of “divisibility rule” because surely it is not a “shorthand way” of testing divisibility by 7, especially if applied to large numbers.

A good example of this slowness consists of the application of the procedure to the ten-digit number: N = 3.218.576.8416 and then perform the division of this number by 7, in the orthodox way. A real rule of divisibility is always a shorthand way of verification regardless of the constitution or the quantity of digits of the tested number. Later, the mentioned number will be submitted to the application of a rule that fits the definition of divisibility rule created by me in 2008.

The mathematical community is usually rigorous and respectful towards definitions. Apparently, in the case of a rule of divisibility by 7, the usual rigor was put aside. What is most embarrassing? To adopt a false rule (trick?) or to admit the inexistence of a real rule? Many specialized mathematical sites adopted the second alternative. This fact can be easily confirmed googling the words: “divisibility by 7” and “no rule”.

Approximately, in 1992 I started my quest to create a rule of divisibility by 7. That was when I learned a rule of divisibility as slow as the others, but less publicized. I had the intuition that I would be able to create a better rule and started my studies. I interrupted my research several times, but I always resumed it.

I tried a different approach from that scholars had adopted in creating their rules. The rules created in two millennia of history are generally based in algorithms that eliminate just one digit each time, or in complicated and extremely slow procedures.

My rules, that I denominate as “Moura Velho” rules of divisibility by 7, are always applied in a simpler and quicker way because they eliminate two or more digits in each application of the respective algorithm.

In 2005 I created and made public the first “Moura Velho” rule of divisibility by 7, that fits the specific definition of “divisibility rule” that I consider the first real rule of divisibility by 7 of the History of The Theory of Numbers. Please, see a video of this rule: https://www.youtube.com/watch?v=plRO-L_0cto .

In the following years, I created new “Moura Velho Rules” of divisibility by 7 and in 2008 I created the rule I consider the simplest and quickest. Changing what must be changed, this rule works also for divisibility by 11 and 13. Derived of it, I created my last rule in 2013; it is a little more complex, but it is equally quick. Both rules may be watched, among others, on the site of Vimeo: https://vimeo.com/92571509 .

The “Moura Velho” rules of divisibility by 7 were all included (except the last) in a book inedited until now and officially registered as: “Divisibilidade por 7; o Fim de um Mito?” (“Divisibility by 7: the End of a Myth?”)

This is the algorithm of the rule I created in 2008:

N = a,bcd; a’ ≡ ( ─ cd mod 7 + a ) mod 7 → a’b;
if 7|a’b then 7|N

For larger numbers, the two last digits are eliminated and abcd dislocates to the left until the last pair of digits to the left is reached. If the last pair of digits to the left is incomplete, a zero must be mentally added to compensate for the absence of the digit "a". If the final result a’b is a multiple of 7 the same happens to the tested number.

─ cd mod 7 is the inverse additive mod 7 that corresponds to the difference between cd and the immediately superior multiple of 7.

Example: ─ 12 mod 7 ≡ 2; using common language: 12 to 14 equals 2.

Why it works:

The algorithm works because ─ cd mod 7 ≡ 6 cd mod 7 that is added to the place value of the thousands: + 6,000 cd. As cd is eliminated (subtracted) the procedure results in this operation: 6,000 cd ─ cd = 5,999 cd. As 7|5,999 the value of N mod 7 is preserved in each application of the algorithm. This fact is easily confirmed substituting the eliminated pair of digits by zeroes.

Note : ─ n mod x ≡ ( x ─ 1 ) . n mod x for n and for x.

How it works through a numerical example:

N = 3,218,576,816

This is the number mentioned before.

The algorithm may be applied repetitively from right to left, in an extremely quick and precise way, exclusively through mental calculations, with no need of any annotations.

The steps concerning the application of the rule will be described using the common language, to make easier the understanding.

Step 1: 16 to 21 = 5; 5 + 6 ─ 7 = 4 → 32185748
Step 2: 48 to 49 = 1; 1 + 5 = 6 → 321867
Step 3: 67 to 70 = 3; 3 + 1 = 4 → 3248
Step 4: 48 to 49 = 1; 1 + 3 = 4 → 42; 7|42 and 7|N

The final result (FR) = 42

How to determine the remainder of the division of N by 7:

If 7ƗN, to determine the remainder, it is necessary to perform the counting of number of pairs of digits (n) that form N and subtract : n ─ 1.

If ( n ─ 1 ) mod 3 ≡ 0; r ≡ RF mod 7
If ( n ─ 1 ) mod 3 ≡ 1; r ≡ 2 . RF mod 7
If ( n ─ 1 ) mod 3 ≡ 2; r ≡ 4 . RF mod 7

In 1654 Pascal made public his criterion for divisibility by 7 (theorem 2.5) that consists of multiplying each digit of a number by the following sequence of multipliers:
...231546231
The multiplication of FR by 1, 2 or 4 mod 7 to determine the remainder of the division of N by 7 is based on the sequence of multipliers corresponding to each digit of the ones of each pair of digits (in underline), from right to left.

Example: N = 82,324,544
Step 1 : 44 to 49 = 5; 5 + 4 ─ 7 = 2 → 823225
Step 2 : 25 to 28 = 3; 3 + 3 = 6 → 8262
Step 3 : 62 to 63 = 1; 1 + 8 ─ 7 = 2 → 22; 7Ɨ22 and 7ƗN
The remainder: n = 4; ( 4 ─ 1 ) mod 3 ≡ 0;
 então r = RF mod 7 → 22 mod 7 ≡ 1

The remainder of the division of N by 7 equals 1.

So I finish the presentation of my preferred Moura Velho Rule of divisibility by 7. I chose it because its algorithm is easily apprehended and its application is extremely quick and precise. However, any Moura Velho Rule of divisibility by 7 is quicker than any other rule created by other researchers in two millennia of history.

I hope that the mathematical community welcomes the “Moura Velho” rules of divisibility by 7 for the sake of justice and recognition of the enormous research I conducted over approximately twenty years. Mathematics as science has no ego; it has already hosted the “Moura Velho” rules of divisibility by 7.

quinta-feira, 15 de maio de 2014


Watch this video:

http://vimeo.com/92940268 

 

DETAILS OF THE FIFTH MOURA VELHO RULE


This post is designed to clarify details of the fifth Moura Velho rule of divisibility by 7 presented in a recent video as a bonus.Changing what must be changed, this rule works also to test divisibility by 13.

THE ALGORITHM


N = abc; xabc → 7|xa; S = x + bc; if 7|S then 7|N


For larger numbers, this algorithm must be applied repetitively to each period of N. The inverse additive mod 7 of each sum (S) must be added to the digit “x” of the next period and to the number formed by the two following digits.

The procedure must be applied until the rightmost period of N is reached. If 7|FR (final result) then 7|N. If 7ƗFR then FR mod 7 is the remainder of the division of N by 7.

If the initial period is incomplete, the algorithm must be applied partially.

WHY IT WORKS



Digit “x” is equivalente to 2a mod 7 and bc is equivalente to ( 3b + c ) mod 7. Then the sum of the products mod 7 obtained by the application of the algorithm is: SP = 2a + 3b + 1c and the multipliers are respectively: 2, 3 and 1, exactly the same multipliers established by Pascal in his criterion for divisibility by 7 (theorem 2.5) to the three digits of the period of the first order, as mentioned before.


Applying the inverse additive mod 7 to SP:

─ ( 2a + 3b + c ) mod 7 ≡ 5a + 4b + 6c.


For larger numbers, the following period is formed by the digits “def”. The application of the algorithm to the following period results in SP = 2d + 3e + f and the aggregated sum of both periods is SP = 5a + 4b + 6c + 2d + 3e + f, whose multipliers are: 5, 4, 6, 2, 3 and 1 that are the multipliers established by Pascal when he created his criterion for divisibility by 7.


If the number is formed by various periods, the successive and cumulative application of the inverse additive mod 7 to each sum obtained in the passage of one period to another implies the successive repetition of the multipliers established by Pascal: ...31546231546231


The application of this rule is valid because it is equivalent to the application in mod 7 of the multipliers established by Pascal in his criterion for divisibility by 7.


If 7|FR (final result) then 7|N; if 7ƗFR then FR mod 7 is equivalent to the remainder of the division of N by 7.


HOW IT WORKS AND REMAINDER


Mental calculation may be performed very quickly. Notes are used only to illustrate the application of the rule.


N = 62,324,452; 62; (6)324, (1)452
─ 62 mod 7 + 6 + 24 = 31; ─ 31 mod 7 + 1 + 52 = 57; 7Ɨ57 and 7ƗN; RF = 57; 57 mod 7 ≡ 1 = remainder of the division of N by 7.


N = 362,458,923,312; (6)362, (1)458, (4)923, (6)312
6 + 62 = 68; ─ 68 mod 7 + 1 + 58 = 61;

─ 61 mod 7 + 4 + 23 = 29; ─ 29 mod 7 + 6 + 12 = 30; 7Ɨ30 and 7ƗN; RF = 30; 30 mod 7 ≡ 2 = remainder of the division of N by 7.

DETAILS OF THE FOURTH MOURA VELHO RULE


This post is designed to clarify details of the fourth 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 13.


THE ALGORITHM


N = abc; abxc → 7|xc; S = ─ ab mod 7 + x; se 7|S então 7|N
Digit “x” must be inserted mentally in a way that it forms a multiple of 7 with “c”.


For larger numbers, this algorithm must be applied repetitively, from left to right, regarding each period of N; abc is eliminated and dislocated to the next period. Each sum obtained must be added to the number formed by the two initial digits of the following period, before each new application of the algorithm.If 7|FR (final result) then 7|N. If the first period is incomplete, the algorithm must be applied partially.


WHY IT WORKS



According to the multiplication table mod 7 that I created to develop the Moura Velho rules it follows that:

 ─ ab mod 7 ≡ 6 ab mod 7 ≡ ( 4a + 6b ) mod 7 and x mod 7 ≡ 2c mod 7.


The application of this algorithm is equivalent to this sum of products mod 7:


SP = 4a + 6b + 2c, in which 4, 6 and 2 belong to a sequence of three multipliers determined by Pascal in his criterion for divisibility by 7.


This way, if 7|SP (sum of products) then 7|N and if 7ƗSP then the remainder of the division of N by 7 is equivalent to 2FR (final result) mod 7 because the multiplier applied to the ones is 2, as it was explained before.


In the case of this rule there is no need of application of the inverse additive mod 7 in the passage of one period to another because the addition of any number multiplied by 2 mod 7 to any number formed by the following two digits preserves the value of N mod 7. The number multiplied by 2 must be eliminated.


HOW IT WORKS



Each period submitted to the application of the algorithm is eliminated; the obtained result is added to the number formed by the two subsequent digits before each new application of the algorithm.


The procedure is repeated until the last period of N is reached. If 7|FR (final result) then 7|N. If 7ƗFR then FR ≡ 2 r mod 7 (two times the remainder of N/7).


Examples:


N = 324,261; 32(1)4, 26(2)1


 ─  32 mod 7 + 1 = 4; ─ (4 + 26) mod 7 + 2 = 7; 7|7 e 7|N


Using common language: 32 to 35 = 3; 3 + 1 = 4; 4 + 26 = 30; 30 to 35 = 5; 5 + 2 = 7.



N = 389,453,322; 38(4)9,45(6)3,32(4)2


 ─ 38 mod 7 + 4 ≡ 8; ─ ( 8 + 45 ) mod 7 + 6 = 9; 

─ ( 9 + 32 ) mod 7 + 4 = 5; 7Ɨ5 e 7ƗN


THE REMAINDER


The final result (FR) of the application of this rule is equivalent to 2 times the remainder (r) of the division of N by 7. The remainder is obtained multiplying ( 4 . RF ) mod 7 because ( 4 . RF ) mod 7 ≡ RF ≡ r (remainder)


In the case of N = 389,453,322 we have RF = 5.

Performing ( 4 . 5 ) mod 7 ≡ 6 ( the remainder of the division of N by 7).


Additional example:


N = 243,562; 24(6)3,56(4)2


─ 24 mod 7 + 6 = 10; ─ ( 10 + 56 ) mod 7 + 4 = 8; 7Ɨ8 and 7ƗN


RF = 8; ( 4 .
8 ) mod 7 ≡ 4 = remainder of the division of N by 7.

DETAILS OF THE THIRD MOURA VELHO RULE


This post is designed to clarify details of the third 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 13. It’s a variation of a rule I presented in a Youtube video.


THE ALGORITHM


N = abc; abcy → 7|cy; S = ab + c + y; if 7|S then 7|N

The digit "y" is mentally inserted in a way that it forms with "c" a multiple of 7.This algorithm must be applied repetitively to each period belonging to N. The inverse additive mod 7 of each sum (S) must be added to the number formed by the two initial digits of the next period, before each new application of the algorithm. If 7|FR (final result) then 7|N. If the initial class is incomplete the algorithm must be applied partially.


WHY IT WORKS


In 1654 Pascal established the following multipliers according to his criterion of divisibility by 7: ... 31546231546231 that must be applied repetitively, from right to left, to each digit of a given number. The tested number is divisible by 7 if the sum of the products is a multiple of 7. The multiplier 1 is applied to the ones, the multiplier 3 is applied to the tens, etc.


However, if 7|N the sum of products is also divisible by 7 if the ones digit is multiplied by any other multiplier, since the order of the multipliers don’t change. If 7ƗN then the sum of products is equivalent in mod 7 to the value of the remainder of the division of N by 7 multiplied by the value of the multiplier applied to the ones.

This occurs because Pascal’s multipliers are in geometric progression in module 7.


According to the multiplication table mod 7 that I created to develop the Moura Velho rules for divisibility by 7 it follows that: ab mod 7 ≡ ( 3a + 1b ) mod 7 and that c + y ≡ 5c mod 7. In this case, the multipliers used are 3, 1 and 5; and S = 3a + 1b + 5c.Then ─ S mod 7 ≡ 4a + 6b + 2c


In a number formed by two periods the next period is “def” that submitted to the application of the algorithm results in

S = 3d + 1e + 5f and the aggregated sum of products of both periods is SP = 4a + 6b + 2c + 3d + 1e + 5f.


The repetitive and cumulative application of the algorithm with the intermediation of the additive inverse of each sum obtained results in repetitive and alternating application of the following multipliers: …5462315462315So if 7|N then 7|SP and if 7ƗN then SP ≡ 5r mod 7 (r = remainder)


HOW IT WORKS


Mental calculation can be done extremely quickly. The notes were made only to illustrate the application of the rule.


N = 293,526; 293(5),526(3)
29 + 3 + 5 = 37; ─ 37 mod 7 + 52 = 57; → 576; 57 + 6 + 3 = 66; 7Ɨ66 and 7ƗN
N = 31,594,633; 31(4),594(2),633(5)3 + 1 + 4 = 8; ─ 8 mod 7 + 59 = 65; 65 + 4 + 2 = 71; ─ 71 mod 7 + 63 = 6; 6 + 3 + 5 = 14; 7|14 and 7|N.

THE REMAINDER


When 7ƗN, as explained, the final result (FR) is equivalent to the value of the remainder multiplied by 5. As ( 3 . 5 ) mod 7 ≡ 1 mod 7, to determine the remainder of dividing N by 7 simply calculate: 3RF mod 7 .

For N = 293,526 the final result (FR) is 66 and the remainder is ( 3 . 66 ) mod 7 ≡ 2.


 

Additional example:


Applying the rule, to avoid numbers of more than two digits it is useful to substitute the tens value above 7 respectively this way: 7 by 0, 8 by 1 and 9 by 2, as in the following example:N = 823,951,634,223; 823(5),951(4),634(2),223(5)
                                 123(5),251(4),634(2),223(5)


12 + 3 + 5 = 20; ─ 20 mod 7 + 25 = 26; 26 + 1 + 4 = 31; ─ 31 mod 7 + 63 + 4 + 2 = 73 → 03;


─ 3 mod 7 + 22 + 3 +5 = 34 (RF)


The remainder: ( 3 . 34 ) mod 7 ≡ 4


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.

segunda-feira, 5 de maio de 2014


DETAILS OF THE FIRST MOURA VELHO RULE

This post is designed to clarify details of the first Moura Velho Rule of divisibility by 7 presented in a recent vídeo.


Generally, the Moura Velho rules work quickly through simple and successive mental calculations and dispense the use of pencil and paper.


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


THE ALGORITHM
 N = a,bcd; a’ ≡ ( ─ cd mod 7 + a ) mod 7; cd is eliminated, resulting in a two-digit number a’b; if 7|a’b then 7|N.


This rule is applied to the pairs of digits of N from right to left.


WHY IT WORKS

─ 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.


HOW IT WORKS

N = 8,561; ( ─ 61 mod 7 + 8 ) mod 7 ≡ 3 → 35; 7|35 and 7|N


For larger numbers the algorithm must be repeated with the dislocation of a,bcd from right to left until the leftmost digit is reached. Eventually the last pair to the left may be incomplete; in this case, the digit “a” equals zero.


N = 69,218,683; ( ─ 83 mod 7 + 8 ) mod 7 ≡ 2; → 692126;

 ( ─ 26 mod 7 + 2 ) mod 7 ≡ 4; → 6941;


( ─ 41 mod 7 + 6 ) mod 7 ≡ 0; → 09; 7Ɨ9 and 7ƗN


THE REMAINDER

Let n = number of pairs of digits of N, including as a pair the eventual incomplete pair to the left.


Let FR = final result of the procedure.


If ( n ─ 1 ) mod 3 ≡ 0 then the remainder is FR mod 7.


If ( n ─ 1 ) mod 3 ≡ 1 then the remainder is 2 . FR mod 7.


If ( n  ─ 1 ) mod 3 ≡ 2 then the remainder is 4 . FR mod 7.


For N = 69,218,683; n = 4 e RF = 9; ( 4 ─ 1 ) mod 3 ≡ 0 and RF mod 7 ≡ 2;
Then the remainder of the division of N by 7 is 2.


 Additional example:


N = 124,934,652; ( ─ 52 mod 7 + 4 ) mod 7 ≡ 1; → 1249316;( ─ 16 mod 7 + 9 ) mod 7 ≡ 0; → 12403; ( ─ 3 mod 7 + 2 ) mod 7 ≡ 6; → 164;( ─ 64 mod 7 + 0 ) mod 7 ≡ 6; → 61; 7Ɨ61 and 7ƗN


The remainder: ( n ─ 1 ) mod 3 ≡ 1; 2 . 61 mod 7 ≡ 3; the remainder of the division of N by 7 is 3.