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

38 lines
1.8 KiB
Text

Numbers   (positive integers expressed in base ten)   that are (evenly) divisible by the number formed by the
first and last digit are known as   '''gapful numbers'''.
''Evenly divisible''   means divisible with   no   remainder.
All   one─   and two─digit   numbers have this property and are trivially excluded.   Only
numbers &nbsp; <big> &ge; </big> '''100''' &nbsp; will be considered for this Rosetta Code task.
;Example:
<big>'''187'''</big> &nbsp; is a &nbsp; '''gapful''' &nbsp; number because it is evenly divisible by the
number &nbsp; <big>'''17'''</big> &nbsp; which is formed by the first and last decimal digits
of &nbsp; <big> '''<u>1</u>8<u>7</u>'''. </big>
About &nbsp; <big>7.46%</big> &nbsp; of positive integers are &nbsp; ''gapful''.
;Task:
:* &nbsp; Generate and show all sets of numbers (below) on one line (horizontally) with a title, &nbsp; here on this page
:* &nbsp; Show the first &nbsp; '''30''' &nbsp; gapful numbers
:* &nbsp; Show the first &nbsp; '''15''' &nbsp; gapful numbers &nbsp; <big> &ge; </big> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'''1,000,000'''
:* &nbsp; Show the first &nbsp; '''10''' &nbsp; gapful numbers &nbsp; <big> &ge; </big> &nbsp; '''1,000,000,000'''
;Related tasks:
:* &nbsp; [https://rosettacode.org/wiki/Harshad_or_Niven_series Harshad or Niven series].
:* &nbsp; [https://rosettacode.org/wiki/Palindromic_gapful_numbers palindromic gapful numbers].
:* &nbsp; [https://rosettacode.org/wiki/Largest_number_divisible_by_its_digits largest number divisible by its digits].
;Also see:
:* &nbsp; The OEIS entry: &nbsp; [https://oeis.org/A108343 A108343 gapful numbers].
:* &nbsp; numbersaplenty [http://www.numbersaplenty.com/set/gapful_number/ gapful numbers]
<br><br>