Enter a number to check if it's a self number, or input a range to generate all self numbers within that range.
A self number, also known as a Colombian number, is a natural number that cannot be expressed as the sum of any other natural number and the sum of its digits. For a number \( n \) to be a self number, there must be no integer \( m \) such that \( n = m + S(m) \), where \( S(m) \) is the sum of the digits of \( m \).
Solution:
Iterative Check: For \( m = 1 \) to \( 20 \), calculate \( m + S(m) \):
Result: Since \( m = 15 \) satisfies the condition \( m + S(m) = 21 \), the number 21 is not a self number.