Tuesday, 29 August 2017

elementary number theory - Divisibility criteria for 7,11,13,17,19



A number is divisible by 2 if it ends in 0,2,4,6,8. It is divisible by 3 if sum of ciphers is divisible by 3. It is divisible by 5 if it ends 0 or 5. These are simple criteria for divisibility.




I am interested in simple criteria for divisibility by 7,11,13,17,19.


Answer



(1)



The formulae for 2,3,5,9,11 can be derived from 0rnar10r



Observe that \sum_{0\le r\le n}{a_r10^r}\equiv a_0\pmod 2



\sum_{0\le r\le n}{a_r10^r}\equiv a_0\pmod 5




\sum_{0\le r\le n}a_r10^r\equiv \sum_{0\le r\le n}a_r\pmod 3 as 9\mid(10^r-1)



\sum_{0\le r\le n}a_r10^r\equiv \sum_{0\le r\le n}(-1)^ra_r\pmod {11} as 10^r\equiv(-1)^r\pmod{11}



\sum_{0\le r\le n}a_r10^r\equiv(a_0+a_2+a_4+\cdots)-(a_1+a_3+a_5+\cdots)\pmod{11}



(2)



N=\sum_{0\le r\le n}a_r10^r\equiv \sum_{0\le r\le m-1}a_r10^r\pmod {10^m}\equiv \sum_{0\le r\le m-1}a_r10^r\pmod {2^m} as 2^s\mid 10^s where integer s\ge0




This explains why 2^m\mid N\iff the numbers with lower m digits of N is divisible by 2^m



For example, 2524 will be divisible by 2^2=4 as 24 is, but 2514 will not be divisible by 2^2=4 as 14 is not.



Similarly for 5^m



(3)



For any number y co-prime with 10, we can have a reduction formula as follows:




If a number be 10a+b, we can find u,v in integers such that 10u+y\cdot v=1 (using Bézout's Identity)



So, u(10a+b)+v\cdot y\cdot a=a(10u+y\cdot v)+u\cdot b=a+u\cdot b\implies 10a+b will be divisible by y\iff y\mid(a+u\cdot b)



For example if y=7, we find 3\cdot7+(-2)10=1\implies u=-2,v=3



So, (a+u\cdot b) becomes a-2b



If y=19, we find 2\cdot10+(-1)19=1\implies u=2\implies a+u\cdot b=a+2b




We can always use convergent property of continued fractions to find u,v.



There is no strong reason why this can not be generalized to any positive integer bases.


No comments:

Post a Comment

real analysis - How to find lim_{hrightarrow 0}frac{sin(ha)}{h}

How to find \lim_{h\rightarrow 0}\frac{\sin(ha)}{h} without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...