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

Home > Numbers
Summing the product of digits (Posted on 2019-08-23) Difficulty: 3 of 5
Let p(n) denote the product of the nonzero digits of n. For example, p(5) = 5, p(37) = 21, and p(604) = 24. Without resorting to a computer, evaluate p(1) + p(2) + p(3) + ... + p(999999).

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
re: solution -- I forgot about something | Comment 2 of 4 |
(In reply to solution by Charlie)

I forgot that the numbers with zero in them still count, by ignoring the zero digits, and adding in the product of the rest of the digits. So, for example, 4-digit numbers include those with a single zero, in any of three positions, thus counting 3*45^3, that is three times the value previously (previous comment) calculated for 3-digit numbers; they also include those with two zeros in any of the C(3,2)=3 positions, this time adding in 3*45^2; plus the 45 for the three-zero case.

I have to think about this more, or work out the total.

  Posted by Charlie on 2019-08-23 11:11:35
Please log in:
Remember me:
Sign up! | Forgot password

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

Copyright © 2002 - 2020 by Animus Pactum Consulting. All rights reserved. Privacy Information