sábado, 31 de agosto de 2013

THE CREATION OF THE FIRST "MOURA VELHO RULE"

 

HOW I CREATED MY FIRST RULE OF DIVISIBILITY BY 7

 

I started researching divisibility by 7 in the beginning of the 1990’s. It took me a long time to reach my best results. In 2005 I created my first method of divisibility by 7 and without noticing it I created the first rule of divisibility by 7 of the History of Number Theory that fits the definition of divisibility rule according to Wikipedia:

 

“… a shorthand way of determining whether a given number is divisible by a fixed divisor without performing the division, usually by examining its digits”.

 

 After my first rule, I created various other rules that are quick and accurate.

 

From now on, I will summarize the steps I followed to create my first rule. There were various lapses of time between the steps, some shorter some longer.

 

First step:

 

N = ab; insert “x” before “a” in a way that 7|xa → xab; S = x + a +b

 

If 7|N then 7|S; if 7ƗN then S mod 7 ≡ r (remainder of ab/7)

 

N = 42 → 142 → S = 1 + 4 + 2 = 7; N = 96 → 496 → S = 4 + 9 + 6 = 19; 19 mod 7 ≡ 5 ≡ r

 

Second step:

 

N = bc; insert “y” after “c” in a way that 7|cy → bcy; S = b + c + y

 

If 7|N then 7|S; if 7ƗN then S mod 7 ≡ 5r (5 times the remainder of bc/7)

 

N = 56 → 563 → S = 5 + 6 + 3 = 14; 52 → 521 → S = 5 + 2 + 1 = 8; 8  mod 7 ≡ 1 ≡ 5 . r mod 7

(1 . 3) mod 7 ≡ 3 = r (remainder of N/7)

 

Third step:

 

N = abc; insert “x” before “a” and “y” after “c” according to the previous steps:

 

xabcy; S = x + a + b + c + y

 

If 7|N then 7|S; if 7ƗN then S mod 7 ≡ 5r mod 7 (5 times the remainder of N/7)

 

Fourth step:

 

N = abc,def

 

After applying the three initial steps to each period add ─ S1  mod 7 to S2:

 

S1 = x + a + b + c + y and S2 = x + d + e + f + y

 

In the passage of one period to another, the previous sum must be converted to its additive inverse modulo 7 and added to the next sum till the rightmost period is reached.

 

─ S1 mod 7 + S2 (two periods)

 

─ ( ─ S1 mod 7 + S2 ) mod 7 + S3 (three periods)

 

The repetitive and cumulative application of the additive inverse mod 7 results in an alternation of the signs plus and minus regarding each sum performed.

 

Example:

 

N = 26,965,466

 

First period: 263; 2 + 6 + 3 = 11; ─ 11 mod 7 ≡ “3” (this result will be added to the digits of the second period)

 

Second period: ”3”  49656;  3 + 4 + 9 + 6 + 5 + 6 = 33; ─ 33 mod 7 ≡ “2” (this result will be added to the digits of the third period)

 

Third period: “2” 14663; 2 + 1 + 4 + 6 + 6 + 3 = 22; 7Ɨ22 and 7ƗN

(3 . 22) mod 7 ≡ 3 = r (remainder of N/7)

My next post will be about an algorithm that applies the same multipliers established by Pascal's 2.5 Theorem.

 

 

terça-feira, 13 de agosto de 2013

Pascal Simplified - Divisibility by 7



Pascal’s theorem 2.5 simplified – Divisibility by 7


“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



There were no divisibility rules of divisibility by 7 till 2005 when I created the first rule of divisibility by 7 of the History of Number Theory that fits strictly into the cited definition.



My rule was created by trial and error method and albeit I knew how it works I did not know why it works. Studying Pascal’s theorem 2.5 I found the explanation of why my rule works and much more. To this end I simplified Pascal’s criterion of divisibility by 7 that was demonstrated by himself in 1654 (theorem 2.5).

According to Pascal:

If 7|N and N = abc,def; 7|SP = 5a + 4b + 6c + 2d + 3e + f
SP = sum of products
If 7 łN then SP mod 7 ≡ r (remainder of the division of N by 7)

Pascal established the series of multipliers: 546231 that must be applied to each digit of a number repetitively from right to left starting with 1 applied to the ones place value. It is easy and slow to apply Pascal’s criterion for divisibility by 7 to any number.

Pascal’s criterion for divisibility by 7 doesn’t fit into the definition of divisibility rule because its application is very slow, just like any other mathematical rule created before my rule. But certainly these mathematical rules are efficacious because they reach (slowly) the correct result.

Studying Pascal’s criterion for divisibility by 7 I noticed that:

If 7|N and 7|SP then (z . SP) mod 7, z: z [2,6] (z . SP) mod 7 SP mod 7.

Ex.: (5a +4b + 6c + 2d + 3e +f) . 2 mod 7 ≡ 3a + b + 5c + 4d + 6e + 2f

This means that in addition to the series established by Pascal, the following series can be used to verify if a number is divisible by 7, repetitively applied from right to left starting in the right-most digit that must be applied to the ones place value:

315462, 154623, 623154, 462315 e 231546.

In this case, if 7łN then SP mod 7 ≡ (SP . z) mod 7

This finding is inedit and combined with the multiplication table mod 7 created by me allows the creation of a wide variety of algorithms useful to quickly check divisibility of any number by 7.

My multiplication table mod 7:

Let n = a

Enter “x” before “a” and “y” after “a” in a way that: 7|xa and 7|ay

1 . a = a;        2 .a mod 7 ≡ x;      ( 3 . a ) mod 7 ≡ x + a ;

( 4 . a) mod 7 ≡ y;     ( 5 . a ) mod 7 ≡ a + y and
( 6 . a ) mod 7 ≡ − a mod 7

ab mod 7 ≡ ( 3a + b) mod 7 and
( – ab mod 7 ) ≡ 6ab mod 7 ≡ ( 4a + 6b) mod 7*

*these are useful shortcuts.

The algebraic demonstration of how my rule works:

N = abc,def

Enter “x” before “a” and “y” after “c” → xabcy and perform the addition S1 = x + a + b + c + y

x = 2a and y = 4c; then S1 = 3a + b + 5c

Perform:  – S1 mod 7 ≡ 4a + 6b + 2c

Repeating the initial procedure to “def” → S2 = 3d + e + 5f

SP = − S1  mod 7 + S2 = 4a + 6b + 2c + 3d + e + 5f*

*If 7|N the application of my rule, without performing any multiplication, results in a sum of products equivalent to Pascal’s sum of products resultant of the application of his criterion for divisibility by 7 (theorem 2.5).

If 7|SP then 7|N and if 7łSP then SP mod 7 ≡ (5 . r) mod 7; because

(546231) . 5 mod 7 ≡ 462315 → series of multipliers according to my rule.

The repetitive and cumulative application of the additive inverse to each sum obtained results in the indefinite alternation of the series of multipliers: (315) (462)…

Examples:

N = 961,452,399 → (4)961(4),(1)452(1),(6)399(1)

S1 = 4 + 9 + 6 + 1 + 4 = 24; − S1 mod 7 ≡ 4;

S2 = 4 + 1 + 4 + 5 + 2 + 1 = 17; − S2 mod 7 ≡ 4;

S3 = 4 + 6 + 3 + 9 + 9 + 1 = 32; 7ł32

32 mod 7 ≡ 4; ( 4 . 3 ) mod 7 ≡ 5 = r (remainder of N/7)

 My rule also serves to verify divisibility by 13 and can be indifferently applied from right to left or vice versa.

It is applied straightforwardly from end to end of any number and in its application the largest sum obtained is never greater than 40. A smart kid who knows the multiplication table of 7 is able to apply it.

In my next post I will present how I created my first rule and afterwards I will present new algorithms derived from the simplification of Pascal.