Problem 54680. Determine whether a number is practical
A number n is practical if all smaller numbers can be written as a sum of the proper divisors of n. The number 24 is practical because its proper divisors are 1, 2, 3, 4, 6, 8, and 12 and for example
5 = 4+1, 7 = 4+3, 9 = 6+3, 10 = 8+2, 11 = 8+3, 13 = 12+1, 14 = 12+2, 15 = 12+3, 16 = 12+4,
17 = 12+4+1, 18 = 12+6, 19 = 12+3+4, 20 = 12+8, 21 = 12+8+1, 22 = 12+8+2, 23 = 12+8+3
However, 23 is not practical because its only proper divisor, 1, cannot be repeated in the sum.
Write a function to determine whether a number is practical.
Solution Stats
Problem Comments
Solution Comments
Show commentsGroup

Sequences and Series VI
- 16 Problems
- 3 Finishers
- Compute a determinant
- Determine whether the input is an anagram number
- Generate the Figure-Figure sequence
- Determine whether a number is practical
- Count the peaceful queens
- Flip the parity of digits in a decimal expansion
- Trap a knight
- Count estrangements
- List numbers that are not squares
- List the nth term of Rozhenko’s inventory sequence
- Count the unitary divisors of a number
- Sum the unitary divisors of a number
- Compute the unitary totient of a number
- Compute the Lagarias Riemann Hypothesis sequence
- Compute the largest number with a given integer complexity
- Compute the Tetris sequence
Problem Recent Solvers6
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!