Multiply and Add

Logic Level 4

Given any positive integer n n , let p ( n ) p(n) be the product of the non-zero digits of n n . If n n has only one digit, then p ( n ) p(n) is equal to that digit.

L e t : S = p ( 1 ) + p ( 2 ) + p ( 3 ) + + p ( 999 ) Let: S = p(1) + p(2) + p(3) +\ldots + p(999) .

What is the largest prime factor of S S ?


The answer is 103.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

S = p ( 1 ) + p ( 2 ) + p ( 3 ) + . . . + p ( 999 ) = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 2 ( 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 ) + 3 ( 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 ) + . . . . . . + 9 × 9 ( 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 ) = 1 + ( 1 ) ( 46 ) + ( 1 ) ( 46 ) + 2 ( 46 ) + 3 ( 46 ) + . . . . . . + 9 ( 7 ) ( 46 ) + 9 ( 8 ) ( 46 ) + 9 ( 9 ) ( 46 ) = 1 + ( 46 ) ( 46 ) ( 46 ) = 4 6 3 1 = 97335 = 3 3 ˙ 5 ˙ 7 ˙ 103 \begin{aligned} S & = p(1)+p(2)+p(3)+...+p(999) \\ & = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 \\ & \quad \quad +1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 \\ & \quad \quad \quad + 2 (1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9) \\ & \quad \quad \quad \quad + 3 (1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9) +... \\ & \quad \quad \quad \quad \quad ... + 9\times 9(1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9) \\ & = -1 + (1)(46) + (1)(46) + 2(46) + 3(46) +...\\ & \quad \quad \quad ... + 9(7)(46) + 9(8)(46) + 9(9)(46) \\ & = -1 + (46)(46)(46) = 46^3 -1 = 97335 = 3^3\dot{}5\dot{}7\dot{}103 \end{aligned}

Therefore, the largest prime factor of S S is 103 \boxed{103} .

Moderator note:

Find a one-paragraph solution to show that the sum is equal to 4 6 3 1 46^3 - 1 .

What u meant by one paragraph solution? Is this provided solution long?

Ravi Dwivedi - 5 years, 5 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...