42857 for those who wonder
And for ops title: 23076923
Actually disgusting
Isn’t every number divisible by 7?
The divisability rule for 7 is that the difference of doubled last digit of a number and the remaining part of that number is divisible by 7.
E.g. 299’999 → 29’999 - 18 = 29’981 → 2’998 - 2 = 2’996 → 299 - 12 = 287 → 28 - 14 = 14 → 14 mod 7 = 0.
It’s a very nasty divisibility rule. The one for 13 works in the same way, but instead of multiplying by 2, you multiply by 4. There are actually a couple of well-known rules for that, but these are the easiest to remember IMO.
If all of the digits summed recursively reduce to a 9, then the number is divisible by 9 and also by 3.
If the difference between the sums of alternating sets digits in a number is divisible by 11, then the number itself is divisible by 11.
That’s all I can remember, but yay for math right?
Well, on the side of easy ones there is “if the last digit is divisible by 2, whole number is divisible by 2”. Also works for 5. And if you take last 2 digits, it works for 4. And the legendary “if it ends with 0, it’s divisible by 10”.
There’s also the classic “no three positive integers a, b, and c to satisfy a**n + b**n = c**n for values of n greater than 2“ trick but my proof is too large to fit in this comment.
Never realized there are so many rules for divisibility. This post fits in this category:
Forming an alternating sum of blocks of three from right to left gives a multiple of 7
299,999 would be 999 - 299 = 700 which is divisible by 7. And if we simply swap grouped digits to 999,299, it is also divisible by 7 since 299 - 999 = -700.
And as for 13:
Form the alternating sum of blocks of three from right to left. The result must be divisible by 13
So we have 999 - 999 + 299 = 299.
You can continue with other rules so we can then take this
Add 4 times the last digit to the rest. The result must be divisible by 13.
So for 299 it’s 29 + 9 * 4 = 65 which divides by 13. Pretty cool.