Problem 58013. Find a number m such that 2m and the square of m have the same digit sum
Solution Stats
Problem Comments
-
2 Comments
> It is the sixth number, including zero, in the sequence of numbers with that property.
Isn't it the seventh?
Also, out of curiosity, why are you disallowing persistent variables?
Yes, seventh--corrected, thanks. Bitten by the "off by one bug" again.
Banning persistent is to add the challenge of dealing with large numbers in Cody time. A while ago I found a quicker way to find the digit sums of a lot of numbers, and this problem was another place to exploit that method.
Solution Comments
Show commentsProblem Recent Solvers4
Suggested Problems
-
21899 Solvers
-
Create a function handle that reverses the input arguments of another function handle
142 Solvers
-
Back to basics 21 - Matrix replicating
1435 Solvers
-
Find perfect placement of non-rotating dominoes (easier)
348 Solvers
-
207 Solvers
More from this Author219
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!