All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Find all Numbers II (Posted on 2022-04-24) Difficulty: 3 of 5
Determine all possible value(s) of a non-leading zero, 5-digit positive integer N that satisfy each of these given conditions:
(i) Product of the digits of N is equal to the sum of its digits.
(ii) N is divisible by the sum of its digits.
(iii) N does NOT contain the digit 3.

Added for completeness:
What is the total number of values of N if we disregard condition (iii)?

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 4
for n=10000:99999
   s=char(string(n));
   prod=1; sod=0;
   good=true;
   for i=1:5
      prod=prod*str2num(s(i));
      sod=sod+str2num(s(i));
   end
   if good==false
      continue 
   end
   if prod==sod
      if mod(n,sod)==0
         disp([n sod]) 
      end
   end
end

The answer, from the list below, is 22112, whose sod is 8 as is its product of digits, and it's divisible by 8 as well.

By disregarding rule iii, we get the following list, where 9 is the sod, pod and divisor rather than the 8 of the preceding answer:

       11133           9
       11313           9
       11331           9
       13113           9
       13131           9
       13311           9
       22112           8
       31113           9
       31131           9
       31311           9
       33111           9
       
Every placement of two 3's and three 1's is a solution because of the divisibility rule for 9.       

  Posted by Charlie on 2022-04-24 09:42:46
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information