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 positive integer, and let be the number of digits in n written in base b. The number n is a polydivisible number if for all,
; Example
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

The following table lists maximum polydivisible numbers for some bases b, where represent digit values 10 to 35.
BaseMaximum polydivisible number Number of base-b digits
22
36
47
510
1025
1228

Estimate for ''Fb''(''n'') and Σ(''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
1122252255
1220411879
1315751445
1411321032
15770688
16571430
17335253
18180141
199074
204437
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 =
new =
digits = 2
while not previous :
numbers.append
for n in previous:
for j in range:
number = n * 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.