Find a number m such that 2m and the square of m have the same digit sum - MATLAB Cody - MATLAB Central

Problem 58013. Find a number m such that 2m and the square of m have the same digit sum

Difficulty:Rate
The number m = 29 has the property that 2m = 58 and m^2 = 841 have the same digit sum. It is the seventh number, including zero, in the sequence of numbers with that property.
Write a function to find the nth term in the sequence, where n can be a vector.

Solution Stats

53.85% Correct | 46.15% Incorrect
Last Solution submitted on Jul 11, 2024

Problem Comments

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
18
8

Problem Recent Solvers6

Suggested Problems

More from this Author291

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page