Problem 2491. Dudeney Numbers: Numbers which are the cube of their decimal sum
From Wikipedia: A Dudeney number is a positive integer that is a perfect cube such that the sum of its decimal digits is equal to the cube root of the number.
For example:
512=(5+1+2)^3
4913=(4+9+1+3)^3
19683=(1+9+6+8+3)^3
Write a function that returns true if a number is a Dudeney number and false otherwise.
Assume all numbers are of base 10.
If a number is negative, assume that only the leading digit carries the negative sign e.g. -4913 -> (-4+9+1+3)^3
Solution Stats
Problem Comments
-
2 Comments
is there any negative dudeney number?
Depends upon how you define them.
If you are taking - sign outside the cube of the sum, every negative number corresponding to the positive Dudeney number is a Dudeney number.
If you define by the way OP has defined, -1 qualifies as a Dudeney number.
Solution Comments
Show commentsGroup

Magic Numbers III
- 15 Problems
- 10 Finishers
- Champernowne Constant
- Pandiagonal Prime Magic Square Verification
- Make a Pandiagonal Prime Magic Square: 11 x 11
- Fangs of a vampire number
- Find all vampire fangs
- is the number happy?
- Pandigital number n°1 (Inspired by Project Euler 32)
- Pandigital number n°2 (Inspired by Project Euler 32)
- Pandigital number n°3 (Inspired by Project Euler 32)
- Pandigital Factors (Based on Euler 491)
- Dudeney Numbers: Numbers which are the cube of their decimal sum
- Factorions: Numbers that equal the sum of the factorials of their digits
- Optimum Egyptian Fractions
- Prime Ladders
- Leftovers? Again?!
Problem Recent Solvers72
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!