Input a number to check if it is practical, or specify a start and end range to generate all practical numbers within that range.
A practical number is a positive integer \( n \) such that every positive integer less than \( n \) can be expressed as a sum of distinct proper divisors of \( n \). In other words, practical numbers have abundant divisors, and their combinations cover all integers less than \( n \).
Solution:
Proper divisors of 6: 1, 2, 3.
Positive integers less than 6: 1, 2, 3, 4, 5.
Verification:
1 = 1
2 = 2
3 = 3
4 = 1 + 3
5 = 2 + 3
Result: 6 is a practical number.
Solution:
Proper divisors of 8: 1, 2, 4.
Positive integers less than 8: 1, 2, 3, 4, 5, 6, 7
Verification:
1 = 1
2 = 2
3 = 1 + 2
4 = 4
5 = 1 + 4
6 = 2 + 4
7 = 1 + 2 + 4
Result: 8 is a practical number.
Solution:
Proper divisors of 10: 1, 2, 5.
Positive integers less than 10: 1, 2, 3, 4, 5, 6, 7, 8, 9.
Verification:
1 = 1
2 = 2
3 = 1 + 2
4 = 2 + 2 (repetition of the same divisor is not allowed)
5 = 5
6 = 1 + 5
7 = 2 + 5
8 = 1 + 2 + 5
9 = 2 + 2 + 5
Result: Since 4 cannot be expressed using distinct proper divisors, 10 is not a practical number.