In mathematics a polydivisible number (or magic number) is a number with digits abcde... that has the following properties :
For example, 345654 is a six-digit polydivisible number, but 123456 is not, because 1234 is not a multiple of 4. Polydivisible numbers can be defined in any base - however, the numbers in this article are all in base 10, so permitted digits are 0 to 9.
The polydivisible numbers are
The smallest base 10 polydivisible numbers with n digits are
The largest base 10 polydivisible numbers with n digits are
The number F(n) of polydivisible numbers of length n for n = 1, 2, 3, ... is
There are 20,456 polydivisible numbers altogether, and the longest polydivisible number, which has 25 digits, is :
If k is a polydivisible number with n-1 digits, then it can be extended to create a polydivisible number with n digits if there is a number between 10k and 10k+9 that is divisible by n. If n is less or equal to 10, then it is always possible to extend an n-1 digit polydivisible number to an n-digit polydivisible number in this way, and indeed there may be more than one possible extension. If n is greater than 10, it is not always possible to extend a polydivisible number in this way, and as n becomes larger, the chances of being able to extend a given polydivisible number become smaller. On average, each polydivisible number with n-1 digits can be extended to a polydivisible number with n digits in 10/n different ways. This leads to the following estimate for F(n) :
Summing over all values of n, this estimate suggests that the total number of polydivisible numbers will be approximately
In fact, this underestimates the actual number of polydivisible numbers by about 3%.
Polydivisible numbers represent a generalization of the following well-known problem in recreational mathematics :
The solution to the problem is a nine-digit polydivisible number with the additional condition that it contains the digits 1 to 9 exactly once each. There are 2,492 nine-digit polydivisible numbers, but the only one that satisfies the additional condition is
Other problems involving polydivisible numbers include: