Content deleted Content added
Undid revision 922931912 by 211.75.72.139 (talk) it is customary in number theory to use A-Z to represent 11-36 in a positional number system. |
|||
Line 273:
The number of base 10 polydivisible numbers with ''n'' digits are
:9, 45, 150, 375, 750, 1200, 1713, 2227, 2492, 2492, 2225, 2041, 1575, 1132, 770, 571, 335, 180, 90, 44, 18, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... {{OEIS|id=A143671}}
==Programming example==
The example below searches for polydivisible numbers in [[Python (programming language)|Python]].
<source lang=python>
def find_polydivisible(base):
numbers = []
previous = []
for i in range(1, base):
previous.append(i)
new = []
digits = 2
while not previous == []:
numbers.append(previous)
for i in range(0, len(previous)):
for j in range(0, base):
number = previous[i] * base + j
if number % digits == 0:
new.append(number)
print(new)
previous = new
new = []
digits = digits + 1
return numbers
</source>
==Related problems==
|