1 n + 2 n + 3 n + 4 n
For any positive integer n , what is the largest possible trailing zeros of the of the expression above?
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.
For n=2k, 1 n + 3 n ≡ 2 ( m o d 4 ) ;
for n=2k+1, 1 n + 3 n ≡ 4 ( m o d 8 ) .
Log in to reply
I didn't know how to insert the mod symbol so wrote in language
good solution !
did the same way ;)
let's define a n = 1 n + 2 n + 3 n + 4 n
we can see that for n > 2 , a n = 2 ( m o d 8 ) or a n = 4 ( m o d 8 )
So a n has a maximum of two trailing zeros for n> 2.
and since a 0 = 1 , a 1 = 1 0 , a 2 = 3 0 , a 3 = 1 0 0 .
The result is 2
Short and sweet nice one. c:
Python 2.7:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
The problem with the computational approach is that it doesn't go on forever. How do you know there isn't some very large value of n which gives you 3, 4, 1000, so on?
Seeing you after a long time
First note that n can't be divisible by 4 as in that case the expression is congruent to 4 modulo 10 and so it won't end in 0. So, if n is even, the highest power of 2 which will divide the expression is 1. So, we need to consider the case only for odd n whether it can end in more than 1 zeroes. Now, as n is odd, we can easily use LTE (Lifting The Exponent Lemma) on 3 n + 1 n and 4 n + 2 n separately and we get the answer as 2.
Problem Loading...
Note Loading...
Set Loading...
We define f n = ∑ i = 1 4 i n , first of all check for n = 1,2,3,4. In n = 4 the unit digit is not 0. n =4k +1, 4k+2 or 4k+3 now for odd cases of n f n = 1 n + 3 n + 2 n [ 2 n + 1 ] , 1 n + 3 n = 4 × ( 3 n − 1 + . . . . . . + 3 0 ) now note that there are n terms in the just above stated sum All of them are odd as 3 j is always odd , one pair of the odd terms when added becomes even but as there are n terms and n is odd one odd term will be lesft at last and odd + even is odd. So here maximum power of 2 dividing f n is 2 as only 4 divides 1 n + 3 n and so maximum zeroes at the end is 2. If we proceed similarly for the only even case n = 4k + 2 . We get maximum power of 2 dividing f n is 1. Since we had to obtain maximum no of zeroes at the end of f n our answer is of the odd case i.e. 2