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.)
Some Thoughts solution | Comment 1 of 4
Consider the 1-digit, 2-digit, etc. numbers separately.

The values for the 1-digit numbers total 45.

That 45 is, of course, 1+2+3+4+5+6+7+8+9. But these are also the possibilities for the second digit of 2-digit numbers. Each is combined with each of the 1-digit numbers, and due to the associative property, when you multiply each 2-digit numbers' digits and add them, you'll get (1+2+3+4+5+6+7+8+9)*(1+2+3+4+5+6+7+8+9) or 45^2.

Similarly for each number of digits, the new digit is appended to the end of the previous digits, giving 45^n as the total within number of digits.

We need to sum the first six powers of 45. It's like taking a repunit in base 45, seven long, and subtracting 1 (the 45^0 position).

The sum of powers zero through six of 45 is (45^7-1)/44 = 8,492,487,571; subtracting 1 makes it 8,492,487,570, the answer.

  Posted by Charlie on 2019-08-23 10:54:18
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