Problem 44230. I'm going to enjoy watching you calculate, Mr Anderson

Created by James in Community

Smith numbers are numbers such that if you add up all of the digits in the number, that sum equals the sum of all of the digits in all of their factors. This term was coined by Albert Wilansky, when he noticed the defining property in the phone number of his brother-in-law Harold Smith: 493-7775.


The prime factors of 4937775 are 3, 5, 5, and 65837. 3+5+5+(6+5+8+3+7) = 42

Since all prime numbers obviously meet this criteria, Smith numbers are defined as composite numbers. Write a MATLAB function that will tell you if a given number is a Smith number.

Solution Stats

61.54% Correct | 38.46% Incorrect
Last solution submitted on Jan 24, 2019

Problem Comments