Polydivisible number
In mathematics a polydivisible number is a number in a given number base with digits abcde... that has the following properties :
- Its first digit a is not 0.
- The number formed by its first two digits ab is a multiple of 2.
- The number formed by its first three digits abc is a multiple of 3.
- The number formed by its first four digits abcd is a multiple of 4.
- etc.
Definition
For example, 10801 is a seven-digit polydivisible number in base 4, as
Enumeration
For any given base, there are only a finite number of polydivisible numbers.Maximum polydivisible number
All numbers are represented in base, using A−Z to represent digit values 10 to 35.Base | Maximum polydivisible number | Number of digits in maximum polydivisible number |
2 | 10 | 2 |
3 | 20 0220 | 6 |
4 | 222 0301 | 7 |
5 | 40220 42200 | 10 |
10 | 36085 28850 36840 07860 36725 | 25 |
12 | 6068 903468 50BA68 00B036 206464 | 28 |
Estimate for and
Let be the number of digits. The function determines the number of polydivisible numbers that has digits in base, and the function is the total number of polydivisible numbers in base.If is a polydivisible number in base with digits, then it can be extended to create a polydivisible number with digits if there is a number between and that is divisible by. If is less or equal to, then it is always possible to extend an digit polydivisible number to an -digit polydivisible number in this way, and indeed there may be more than one possible extension. If is greater than, it is not always possible to extend a polydivisible number in this way, and as becomes larger, the chances of being able to extend a given polydivisible number become smaller. On average, each polydivisible number with digits can be extended to a polydivisible number with digits in different ways. This leads to the following estimate for :
Summing over all values of n, this estimate suggests that the total number of polydivisible numbers will be approximately
Base | Est. of | Percent Error | |
2 | 2 | 59.7% | |
3 | 15 | -15.1% | |
4 | 37 | 8.64% | |
5 | 127 | −7.14% | |
10 | 20456 | -3.09% |
Specific bases
All numbers are represented in base, using A−Z to represent digit values 10 to 35.Base 2
Base 3
Base 4
Base 5
The polydivisible numbers in base 5 areThe smallest base 5 polydivisible numbers with n digits are
The largest base 5 polydivisible numbers with n digits are
The number of base 5 polydivisible numbers with n digits are
Length n | F5 | Est. of F5 |
1 | 4 | 4 |
2 | 10 | 10 |
3 | 17 | 17 |
4 | 21 | 21 |
5 | 21 | 21 |
6 | 21 | 17 |
7 | 13 | 12 |
8 | 10 | 8 |
9 | 6 | 4 |
10 | 4 | 2 |
Base 10
The polydivisible numbers in base 10 areThe smallest base 10 polydivisible numbers with n digits are
The largest base 10 polydivisible numbers with n digits are
The number of base 10 polydivisible numbers with n digits are
Length n | F10 | Est. of F10 |
1 | 9 | 9 |
2 | 45 | 45 |
3 | 150 | 150 |
4 | 375 | 375 |
5 | 750 | 750 |
6 | 1200 | 1250 |
7 | 1713 | 1786 |
8 | 2227 | 2232 |
9 | 2492 | 2480 |
10 | 2492 | 2480 |
Length n | F10 | Est. of F10 |
21 | 18 | 17 |
22 | 12 | 8 |
23 | 6 | 3 |
24 | 3 | 1 |
25 | 1 | 1 |
Programming example
The example below searches for polydivisible numbers in Python.def find_polydivisible -> List:
"""Find polydivisible number."""
numbers =
previous =
for i in range:
previous.append
new =
digits = 2
while not previous :
numbers.append
for i in range:
for j in range:
number = previous * base + j
if number % digits 0:
new.append
previous = new
new =
digits = digits + 1
return numbers
Related problems
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:
- Finding polydivisible numbers with additional restrictions on the digits - for example, the longest polydivisible number that only uses even digits is
- Finding palindromic polydivisible numbers - for example, the longest palindromic polydivisible number is
- A common, trivial extension of the aforementioned example is to arrange the digits 0 to 9 to make a 10 digit number in the same way, the result is 3816547290. This is a pandigital polydivisible number.