38 lines
1.8 KiB
Text
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 <big> ≥ </big> '''100''' will be considered for this Rosetta Code task.
|
|
|
|
|
|
;Example:
|
|
<big>'''187'''</big> is a '''gapful''' number because it is evenly divisible by the
|
|
number <big>'''17'''</big> which is formed by the first and last decimal digits
|
|
of <big> '''<u>1</u>8<u>7</u>'''. </big>
|
|
|
|
|
|
About <big>7.46%</big> of positive integers are ''gapful''.
|
|
|
|
|
|
;Task:
|
|
:* Generate and show all sets of numbers (below) on one line (horizontally) with a title, here on this page
|
|
:* Show the first '''30''' gapful numbers
|
|
:* Show the first '''15''' gapful numbers <big> ≥ </big> '''1,000,000'''
|
|
:* Show the first '''10''' gapful numbers <big> ≥ </big> '''1,000,000,000'''
|
|
|
|
|
|
;Related tasks:
|
|
:* [https://rosettacode.org/wiki/Harshad_or_Niven_series Harshad or Niven series].
|
|
:* [https://rosettacode.org/wiki/Palindromic_gapful_numbers palindromic gapful numbers].
|
|
:* [https://rosettacode.org/wiki/Largest_number_divisible_by_its_digits largest number divisible by its digits].
|
|
|
|
|
|
;Also see:
|
|
:* The OEIS entry: [https://oeis.org/A108343 A108343 gapful numbers].
|
|
:* numbersaplenty [http://www.numbersaplenty.com/set/gapful_number/ gapful numbers]
|
|
<br><br>
|
|
|