Trailing zeroes of a sum

How many trailing zeroes are in the decimal representation of n = 1 + k = 1 2013 k ! ( k 3 + 2 k 2 + 3 k + 1 ) ? n=1+\displaystyle{\sum_{k=1}^{2013}k!(k^3+2k^2+3k+1)}?


The answer is 501.

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.

4 solutions

Jatin Yadav
Jan 1, 2014

n = 1 + k = 1 2013 k ! ( ( k + 1 ) 3 k 2 ) n= 1 + \displaystyle \sum_{k=1}^{2013} k!( (k+1)^3 - k^2)

= 1 + k = 1 2013 ( ( k + 1 ) ! ( k + 1 ) 2 k ! k 2 ) 1 + \displaystyle \sum_{k=1}^{2013} \big( (k+1)! (k+1)^2 - k!k^2 \big)

= 1 + ( 2014 ) 2 ( 2014 ) ! 1 1 + (2014)^2 (2014)! - 1 = ( 2014 ) 2 2014 ! \boxed{(2014)^2 2014!}

Now, no. of trailing zeroes = exponent of 5 = r = 1 4 2014 5 r = 501 \displaystyle \sum_{r=1}^{4} \bigg \lfloor \frac{2014}{5^r} \bigg \rfloor = \fbox{501}

Kishlaya Jaiswal
Dec 31, 2013

Calculating the sum k = 1 2013 k ! ( k 3 + 2 k 2 + 3 k + 1 ) \sum_{k=1}^{2013}k!(k^3+2k^2+3k+1) in a direct manner would not be an easy task. So, would like to telescope the series, so we can easily find the sum

Now, observe that k 3 + 2 k 2 + 3 k + 1 = ( k + 1 ) 3 k 2 k^3+2k^2+3k+1 = (k+1)^3-k^2

Hence, k = 1 2013 k ! ( k 3 + 2 k 2 + 3 k + 1 ) = k = 1 2013 k ! ( ( k + 1 ) 3 k 2 ) \sum_{k=1}^{2013}k!(k^3+2k^2+3k+1) = \sum_{k=1}^{2013}k!((k+1)^3-k^2)

= k = 1 2013 ( k + 1 ) 3 k ! k 2 k ! = k = 1 2013 ( k + 1 ) 2 ( k + 1 ) ! k 2 k ! = \sum_{k=1}^{2013}(k+1)^3k!-k^2k! = \sum_{k=1}^{2013}(k+1)^2(k+1)!-k^2k!

Now it's easy to calculate the sum, = ( 2 2 2 ! 1 2 1 ! ) + ( 3 2 3 ! 2 2 2 ! ) + ( 201 4 2 2014 ! 201 3 2 2013 ! ) = 201 4 2 2014 ! 1 2 1 ! = (2^22!-1^21!)+(3^23!-2^22!)+\ldots(2014^2-2014!-2013^22013!) = 2014^22014!-1^2 1!

Thus, n = 1 + 201 4 2 2014 ! 1 = 201 4 2 2014 ! n=1+2014^22014!-1=2014^2 2014!

We know, that there will be no trailing zeroes in the decimal representation of 201 4 2 2014^2 . And so we now need to know the trailing zeroes in 2014 ! 2014! , which is similar to calculating exponent of 10 10 (or 5 × 2 5\times2 ) in 2014 ! 2014!

Since, exponent of 5 5 will be less than that of 2 2 , so it's enough to calculate the exponent of 5 5 , which is

= [ 2014 5 ] + [ 2014 5 2 ] + [ 2014 5 3 ] + [ 2014 5 4 ] + = 501 =[\frac{2014}{5}]+[\frac{2014}{5^2}]+[\frac{2014}{5^3}]+[\frac{2014}{5^4}]+\ldots=501

Thus there will be 501 \boxed{501} trailing zeroes in decimal representation of n = 1 + k = 1 2013 k ! ( k 3 + 2 k 2 + 3 k + 1 ) n=1+\sum_{k=1}^{2013}k!(k^3+2k^2+3k+1)

You said there is no trailing zero in decimal representation of 2014^2 and that is fine. However, 2014^2 ends in 4 and this WILL add a zero to the product of 2014^2.(2014!) if 2014! ended in 5. You need to show also that 2014! DOES not end in 5 as the first non-zero trailing digit.

Leonardo DiCaprio - 7 years, 5 months ago

Log in to reply

Ah.....Sorry , I missed that point. (But unfortunately I cannot edit my solution) Thanks, for pointing out my mistake

Kishlaya Jaiswal - 7 years, 5 months ago

And typo: 2014^2 ends in 6 :P

Leonardo DiCaprio - 7 years, 5 months ago

Not really. We are already calculating all exponents of 5 that is sufficient. Also, obviously last non-zero digit of 2014! will be even and not odd.

Bihag Bhatt - 5 years ago
Piyushkumar Palan
Dec 31, 2013

k = 1 2013 k ! ( k 3 + 2 k 2 + 3 k + 1 ) = k = 1 2013 k ! ( k 3 + 3 k 2 + 3 k + 1 ) k ! ( k 2 ) \displaystyle \sum_{k=1}^{2013} k!(k^3+2k^2+3k+1) = \displaystyle \sum_{k=1}^{2013} k!(k^3+3k^2+3k+1) - k!(k^2)

k = 1 2013 k ! ( ( k + 1 ) 3 ) k ! ( k 2 ) = k = 1 2013 ( k + 1 ) ! ( ( k + 1 ) 2 ) k ! ( k 2 ) \displaystyle \sum_{k=1}^{2013} k!((k+1)^3) - k!(k^2) = \displaystyle \sum_{k=1}^{2013} (k+1)!((k+1)^2) - k!(k^2)

= ( 2 ! 2 2 1 ! 1 2 ) + ( 3 ! 3 2 2 ! 2 2 ) + ( 4 ! 4 2 3 ! 3 2 ) + . . . + ( 2014 ! 201 4 2 2013 ! 201 3 2 ) = (2!2^2 - 1!1^2) + (3!3^2 - 2!2^2) + (4!4^2 - 3!3^2) + ... + (2014!2014^2 - 2013!2013^2)

= 2014 ! 201 4 2 1 ! 1 2 = 2014!2014^2 - 1!1^2

n = 2014 ! 201 4 2 \implies n = 2014!2014^2

Now exponent of 5 5 in n n will be 402 + 80 + 16 + 3 = 501 402 + 80 + 16 + 3 = 501

(formula used with proof: http://2000clicks.com/mathhelp/NumberTh10FactorialDivisors.aspx)

Now exponent of 2 2 in n n will be greater than 1000. 1000.

So exponent of 10 10 in n = 501 n = 501 \implies no. of trailing zeros = 501 \boxed{501}

Really nice....I factorised it inan awkward way.... :(

Eddie The Head - 7 years, 5 months ago
1
2
3
4
5
6
7
8
9
from math import factorial
n = 0
k_max = 2013

for k in range(1,k_max+1):
    n += factorial(k)*(k**3+2*k**2+3*k + 1)
n += 1

print 'Number of trailing zeros = %d' %(len(str(n)) - len(str(n).rstrip('0')))

Ans: 501

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...