this post was submitted on 22 Nov 2024
3 points (80.0% liked)

math

804 readers
153 users here now

General community for all things mathematics on @lemmy.world

Submit link and text posts about anything at all related to mathematics.

Questions about mathematical topics are allowed, but NO HOMEWORK HELP. Communities for general math and homework help should be firmly delineated just as they were on reddit.

founded 1 year ago
MODERATORS
 

I really hoped Matt Parker would have shown how to construct these divisibility rules, so I came up with my own method. Find prime P and natural number N such that P*N = a *10^b + c
The smaller a and c are, the better. b determines where you split the number.

Example: P=313 N=16 a=5 b=3 c=8

313*16=5008  
313*16=5 *10^3 + 8  

Now we can test for 223795=313*13*11*5
Split 223795 after the b:th number, 3rd in this case.
223795/10^3=223.795 decimal point separates the components A, B

Multiply the A=223 by c and subtract from the rest B=795 multiplied by a

B*a-A*c=  
795*5-223*8=2191  

Repeat if needed till you get to small enough number.

2191/10^3=2.191  
191*5-2*8=939  

which is easy to see that's 3*313
Some bad combinations don't reduce the starting number but they are at least always divisible by P. Those cases could be called Parker divisibility rules.

You can also see that when c is negative, A*c is added rather than subtracted, which explains why some method add or subtract like Vsauce vs James.
This is just a funny trick to simulate division and modulus by 10^b to get smaller number, while preserving the congruence.

It's possible I made mistake somewhere, but was able to get correct answers with other few examples.

top 1 comments
sorted by: hot top controversial new old
[–] Kaelygon@lemmy.world 1 points 1 hour ago

I wrote some terrible python code to search divisibility rules for a given number and it tests example product divisibility: https://pastebin.com/x7AH6sW0