Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

For a given positive integer n , let P(n) be the product of the non-zero digits of n.

(If n has
only one digits, then P(n) is equal to that digit.) 

Now S(999) = P(1)+P(2)+P(3)+.....+P(999)

What is the largest prime factor of S(999) ?


P(1)+p(2)+p(3)........p(9)=45
p(11)+p(12)+p(13)..........p(19)=1.1+1.2+1.3....1. 9=1.(45)

p(21)+p(22)+p(23)..........p(29)=2.1+2.2+2.3....2. 9=2.(45) 
p(91)+p(92)+p(93)..........p(99)=9.1+9.2+9.3....9. 9=9.(45)
.....

p(10)+p(20)+p(30).............p(90)=45

hence p(1)+p(2)+p(3)..........p(99)=45+(45.45)+45=47.45

now p(101)+p(102)+p(103)....p(199)=1.[p(1)+p(2)+p(3)..+p(99)]=1.47.45
similarly p(201)+p(202)+p(203)...p(299)=2.[p(1)+p(2)+....+p(99)]=2.47.45
.........

p(100)+p(200)+...p(900)=45

hence p(101)+p(102)+p(103)..........p(999)=45.47.45+45

=>p(1) +p(2)+p(3)...p(999)=47.45+45.47.45+45= 45.(47+47.45+1)


=45(48+47.45)
=45*2015

1+2+3+....9=45.
P10 to P99=1(1+2+........9)+2(1+2+....9)......9(1+2+..... .)+(1+....9)=45*46
P100 to P999=(p0+p1+......p9)(p10 .....p99)=46*45*46

45(1+46+46*46)=45*2163
Hence largest prime factor is 103

You might also like