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

Home > Just Math
Digit sum and digit product equality (Posted on 2015-10-06) Difficulty: 3 of 5
Determine the total number of values of a 6-digit positive integer N such that the sum of the digits of N is equal to the product of the digits of N.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer aided solution | Comment 1 of 2
DefDbl A-Z
Dim crlf$


Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)

For a = 1 To 9
For b = a To 9
For c = b To 9
For d = c To 9
For e = d To 9
For f = e To 9
  If a + b + c + d + e + f = a * b * c * d * e * f Then
   Text1.Text = Text1.Text & a & b & c & d & e & f & "    " & a + b + c + d + e + f & crlf
  End If
Next
Next
Next
Next
Next
Next


 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

finds that only the digit set 111126 works.

There are 6 places the 2 could be and then 5 places the 6 could be, so there are a total of 6*5 = 30 such integers.

  Posted by Charlie on 2015-10-06 20:28:06
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 (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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