Content deleted Content added
Alfa-ketosav (talk | contribs) no space before colon |
Add category |
||
(19 intermediate revisions by 10 users not shown) | |||
Line 1:
{{Short description|A number whose first n digits is a multiple of n}}
{{refimprove|date=October 2018}}
In [[mathematics]] a '''polydivisible number''' (or '''magic number''') is a [[natural number|number]] in a given [[number base]] with [[numerical digit|digits]] ''abcde...'' that has the following properties:<ref name="moloy_de">{{Citation|url=https://www.researchgate.net/publication/317116429|title=MATH'S BELIEVE IT OR NOT|last=De|first=Moloy}}</ref>
# Its first digit ''a'' is not 0.
Line 6 ⟶ 8:
# 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==
Let <math>n</math> be a
: <math>\left\lfloor\frac{n
; Example
For example, 10801 is a seven-digit polydivisible number in [[base 4]], as
: <math>\left\lfloor\frac{10801
: <math>\left\lfloor\frac{10801
: <math>\left\lfloor\frac{10801
: <math>\left\lfloor\frac{10801
: <math>\left\lfloor\frac{10801
: <math>\left\lfloor\frac{10801
: <math>\left\lfloor\frac{10801
==Enumeration==
Line 46 ⟶ 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 66 ⟶ 70:
! Percent Error
|-
| [[base 2|2]] || 2 || <math>\frac{
|-
| [[base 3|3]] || 15 || <math>\frac{2}{3}(e^{3} - 1) \approx 12.725</math> || -15.1%
Line 150 ⟶ 154:
The smallest base 5 polydivisible numbers with ''n'' digits are
:1, 11, 110, 1102, 11020, 110204, 1133000, 11330000, 132204314, 1322043140,
The largest base 5 polydivisible numbers with ''n'' digits are
:4, 44, 443, 4431, 44310, 443102, 4431024, 44310242, 443102421, 4022042200,
The number of base 5 polydivisible numbers with ''n'' digits are
Line 188 ⟶ 192:
===Base 10===
The polydivisible numbers in base 10 are
:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 102, 105, 108, 120, 123, 126, 129, 141, 144, 147, 162, 165, 168, 180, 183, 186, 189, 201, 204, 207, 222, 225, 228, 243, 246, 249, 261, 264, 267, 282, 285, 288... {{OEIS|id=A144688}}
The smallest base 10 polydivisible numbers with ''n'' digits are
Line 244 ⟶ 248:
| 2492
| 2480
|-
| 11
Line 290 ⟶ 288:
| 44
| 37
|-
| 21
Line 319 ⟶ 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 = []
previous = [i for i in range(1, base)]
new = []
digits = 2
while not previous == []:
numbers.append(previous)
for
for j in range(0, base):
number =
if number % digits == 0:
new.append(number)
Line 355 ⟶ 345:
* Finding polydivisible numbers with additional restrictions on the digits - for example, the longest polydivisible number that only uses even digits is
:'''
* Finding [[palindromic number|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.
Line 372 ⟶ 362:
{{Divisor classes}}
[[Category:Articles with example Python (programming language) code]]
[[Category:Base-dependent integer sequences]]
[[Category:Modular arithmetic]]
|