Content deleted Content added
m →Programming example: better to define "previous" using a list comprehension (it's clear, concise, idiomatic and faster) |
Add category |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 50:
|}
===Estimate for ''F<
[[File:Graph of polydivisible number vectorial.svg|right|thumb|400px|Graph of number of <math>n</math>-digit polydivisible numbers in base 10 <math>F_{10}(n)</math> vs estimate of <math>F_{10}(n)</math>]]
Line 311:
==Programming example==
The example below searches for polydivisible numbers in [[Python (programming language)|Python]].
<syntaxhighlight lang="python">
def find_polydivisible(base: int) ->
"""Find polydivisible number."""
numbers = []
Line 321:
while not previous == []:
numbers.append(previous)
for
for j in range(0, base):
number =
if number % digits == 0:
new.append(number)
Line 362:
{{Divisor classes}}
[[Category:Articles with example Python (programming language) code]]
[[Category:Base-dependent integer sequences]]
[[Category:Modular arithmetic]]
|