> For the complete documentation index, see [llms.txt](https://mandober.gitbook.io/math-debrief/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mandober.gitbook.io/math-debrief/501-number-theory/615-arithmetic/divisiblity-rules.md).

# Divisibility rules

<https://en.wikipedia.org/wiki/Divisibility_rule>

"General" divisibility rule: to check divisibility by 10 in decimal numeral system, you only have to check if the last digit is 0. So, to check if `d|n`, express `n` in the base `d`, then check if the last digit is 0.

## Divisibility rules in decimal system

* 1: always
* 2: LSD is even
* 3: digit sum is divisible by 3
* 10: LSD is 0

<http://www.numberbases.com/divisibilitytest.html> <https://teresamccullough.wordpress.com/2011/05/25/divisibility-rules-for-numbers-in-bases-other-than-ten/> <http://mathforum.org/library/drmath/view/72740.html> <https://math.stackexchange.com/questions/52778/divisibility-rules-and-congruences> <https://math.stackexchange.com/questions/148784/divisibility-rules-for-bases-other-than-10>
