32 lines
1.9 KiB
Text
32 lines
1.9 KiB
Text
Note: '''[[wp:Harshad_number|Niven]]''' numbers are also called '''Harshad''' numbers.
|
|
:::: They are also called '''multidigital''' numbers.
|
|
|
|
|
|
'''Niven''' numbers are positive integers which are evenly divisible by the sum of its
|
|
digits (expressed in base ten).
|
|
|
|
''Evenly divisible'' means ''divisible with no remainder''.
|
|
|
|
|
|
;Task:
|
|
:* find the gap (difference) of a Niven number from the previous Niven number
|
|
:* if the gap is ''larger'' than the (highest) previous gap, then:
|
|
:::* show the index (occurrence) of the gap (the 1st gap is '''1''')
|
|
:::* show the index of the Niven number that starts the gap (1<sup>st</sup> Niven number is '''1''', 33<sup>rd</sup> Niven number is '''100''')
|
|
:::* show the Niven number that starts the gap
|
|
:::* show all numbers with comma separators where appropriate (optional)
|
|
:::* I.E.: the gap size of '''60''' starts at the 33,494<sup>th</sup> Niven number which is Niven number '''297,864'''
|
|
:* show all increasing gaps up to the ten millionth ('''10,000,000<sup>th</sup>''') Niven number
|
|
:* (optional) show all gaps up to whatever limit is feasible/practical/realistic/reasonable/sensible/viable on your computer
|
|
:* show all output here, on this page
|
|
|
|
|
|
;Related task:
|
|
:* [https://rosettacode.org/wiki/Harshad_or_Niven_series Harshad or Niven series].
|
|
|
|
|
|
;Also see:
|
|
:* [https://cs.uwaterloo.ca/journals/JIS/VOL6/Doyon/doyon.html Journal of Integer Sequences, Vol. 6 (2004), Article 03.2.5, <big>Large and Small Gaps Between Consecutive Niven Numbers</big>].
|
|
:* [https://cs.uwaterloo.ca/journals/JIS/VOL6/Doyon/doyon.pdf (PDF) version of the (above) article by Doyon].
|
|
<br><br>
|
|
|