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

136 Solutions

77 Solvers

Last Solution submitted on Jan 07, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers77

Suggested Problems

More from this Author9

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!