Polydivisible number


In mathematics a polydivisible number is a number in a given number base with digits abcde... that has the following properties :
  1. Its first digit a is not 0.
  2. The number formed by its first two digits ab is a multiple of 2.
  3. The number formed by its first three digits abc is a multiple of 3.
  4. The number formed by its first four digits abcd is a multiple of 4.
  5. etc.

    Definition

Let be a natural number, and let be the number of digits in the number in base. is a polydivisible number if for all,
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.
BaseMaximum polydivisible numberNumber of digits in maximum polydivisible number
2102
320 02206
4222 03017
540220 4220010
1036085 28850 36840 07860 3672525
126068 903468 50BA68 00B036 20646428

Estimate for F_b(n) and \Sigma(b)

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
BaseEst. ofPercent Error
2259.7%
315-15.1%
4378.64%
5127−7.14%
1020456-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 are
The 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 nF5Est. of F5
144
21010
31717
42121
52121
62117
71312
8108
964
1042

Base 10

The polydivisible numbers in base 10 are
The 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 nF10Est. of F10
199
24545
3150150
4375375
5750750
612001250
717131786
822272232
924922480
1024922480

Length nF10Est. of F10
211817
22128
2363
2431
2511

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: