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    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts solution | Comment 1 of 5
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:
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 (13)
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