News for hackers. Stuff that matters.
Re:Divisible by 7 (2016) by Someone on Thursday May 20, 2021 @07:34PM (#27228783)
We have

  abcabc = 1001 × abc = 7 × 11 × 13 × abc
so abcabc also is divisible by 11 and 13.

That also means that, to check divisibility of abcdef by 7, 11, or 13, compute |def-abc| and check whether that is divisible by 7, 11, or 13 since

  abcdef = abcabc + (def - abc) = defdef + 1000 × (abc-def)
Similarly, since 10001 = 73 × 137, abcdabcd always is divisible by 73 and 137.

There are no comments on this comment yet.