RosettaCodeData/Task/N-smooth-numbers/00-TASK.txt
2023-07-01 13:44:08 -04:00

53 lines
2.9 KiB
Text

'''n-smooth''' &nbsp; numbers are positive integers which have no prime factors <big> &gt; </big> '''n'''.
The &nbsp; '''n''' &nbsp; in the expression &nbsp; '''n-smooth''' &nbsp; is always prime;
<br>there are &nbsp; <u>no</u> &nbsp; '''9-smooth''' numbers.
'''1''' &nbsp; (unity) &nbsp; is always included in n-smooth numbers.
<br>2-smooth &nbsp; numbers are non-negative powers of two.
<br>5-smooth &nbsp; numbers are also called &nbsp; [[Hamming numbers]].
<br>7-smooth &nbsp; numbers are also called &nbsp; [[humble numbers]].
A way to express &nbsp; 11-smooth &nbsp; numbers is:
<big><big> 11-smooth = 2<sup>i</sup> &times; 3<sup>j</sup> &times; 5<sup>k</sup> &times; 7<sup>m</sup> &times; 11<sup>p</sup></big></big>
where <big> i, j, k, m, p &ge; 0 </big>
;Task:
:* &nbsp; calculate and show the first &nbsp; '''25''' &nbsp; n-smooth numbers &nbsp; for &nbsp; '''n=2''' &nbsp; ───► &nbsp; '''n=29'''
:* &nbsp; calculate and show &nbsp; three numbers starting with &nbsp; '''3,000''' &nbsp; n-smooth numbers &nbsp; for &nbsp; '''n=3''' &nbsp; ───► &nbsp; '''n=29'''
:* &nbsp; calculate and show twenty numbers starting with &nbsp;'''30,000''' &nbsp; n-smooth numbers &nbsp; for &nbsp; '''n=503''' &nbsp; ───► &nbsp; '''n=521''' &nbsp; (optional)
All ranges &nbsp; (for &nbsp; '''n''') &nbsp; are to be inclusive, and only prime numbers are to be used.
<br>The (optional) n-smooth numbers for the third range are: &nbsp; '''503''', &nbsp; '''509''', &nbsp; and &nbsp; '''521'''.
<br>Show all n-smooth numbers for any particular &nbsp; '''n''' &nbsp; in a horizontal list.
<br>Show all output here on this page.
;Related tasks:
:* &nbsp; [[Hamming numbers]]
:* &nbsp; [[humble numbers]]
;References:
:* &nbsp; Wikipedia entry: &nbsp; [[wp:Hamming numbers|Hamming numbers]] &nbsp; &nbsp; (this link is re-directed to &nbsp; '''Regular number''').
:* &nbsp; Wikipedia entry: &nbsp; [[wp:Smooth number|Smooth number]]
:* &nbsp; OEIS entry: &nbsp; [[oeis:A000079|A000079 &nbsp; &nbsp;2-smooth numbers or non-negative powers of two]]
:* &nbsp; OEIS entry: &nbsp; [[oeis:A003586|A003586 &nbsp; &nbsp;3-smooth numbers]]
:* &nbsp; Mintz 1981: &nbsp; [https://www.fq.math.ca/Scanned/19-4/mintz.pdf 3-smooth numbers]
:* &nbsp; OEIS entry: &nbsp; [[oeis:A051037|A051037 &nbsp; &nbsp;5-smooth numbers or Hamming numbers]]
:* &nbsp; OEIS entry: &nbsp; [[oeis:A002473|A002473 &nbsp; &nbsp;7-smooth numbers or humble numbers]]
:* &nbsp; OEIS entry: &nbsp; [[oeis:A051038|A051038 &nbsp; 11-smooth numbers]]
:* &nbsp; OEIS entry: &nbsp; [[oeis:A080197|A080197 &nbsp; 13-smooth numbers]]
:* &nbsp; OEIS entry: &nbsp; [[oeis:A080681|A080681 &nbsp; 17-smooth numbers]]
:* &nbsp; OEIS entry: &nbsp; [[oeis:A080682|A080682 &nbsp; 19-smooth numbers]]
:* &nbsp; OEIS entry: &nbsp; [[oeis:A080683|A080683 &nbsp; 23-smooth numbers]]
<br><br>