# Base \(n\) divisibility

**Number Theory**Level 4

In base 10, you can determine the divisibility by 3 or 9 simply by adding up all the digits in the number; if the results are divisible by 3 or 9, then the numbers are divisible by 3 or 9, respectively.

What is the smallest base \(n\) such that we can do the same trick for all the numbers from 2 to 6?

In other words, what is the smallest integer \(n > 1\) such that for any number \(x\) written in base \(n\) we can determine the divisibility by all integers \(m\) (\(2 \leq m \leq 6\)), by adding up all the digits of \(x\) and, if the result divides by \(m\), concluding that \(x\) is divisible by \(m\)?