All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Two Power Divides Product (Posted on 2011-12-05)
Find n where 2n is the largest power of 2 that divides the product 2011*2012*2013*.....*4022

 No Solution Yet Submitted by K Sengupta Rating: 4.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 re: analytic solution and computer solution | Comment 3 of 8 |
(In reply to analytic solution and computer solution by Charlie)

There are 2012 numbers in the range 2011 through 4022 and half are even, giving us a start of 1006 factors of 2.

2012 is divisible by 4, so 503 are multiples of 4, adding 503 more factors equal to 2, making 1509 so far.

2011 is 3 mod 8 and 4022 is 6 mod 8, so that of the 2012 numbers in the given range, [2012/8] = 251 are divisible by 8, bringing the total to 1760.

2011 is 11 mod 16 and 4022 is 6 mod 16, so that of the 2012 numbers in the given range, ceil(2012/16) = 126 are divisible by 16, bringing the total to 1886.

2011 is 27 mod 32 and 4022 is 22 mod 32, so that of the 2012 numbers in the given range, ceil(2012/32) = 63 are divisible by 32, bringing the total to 1949.

SO FAR THE NUMBERS ARE OK

2011 is 27 mod 64 and 4022 is 54 mod 64, so that of the 2012 numbers in the given range, [2012/64] = 31 are divisible by 64, bringing the total to 1980.

SHOULD BE 32 INSTEAD OF 31

2011 is 91 mod 128 and 4022 is 54 mod 128, so that of the 2012 numbers in the given range, ceil(2012/128) = 16 are divisible by 128, bringing the total to 1996.

SHOULD BE 17 INSTEAD OF 16

2011 is 219 mod 256 and 4022 is 182 mod 256, so that of the 2012 numbers in the given range, ceil(2012/256) = 8 are divisible by 256, bringing the total to 2004.

SHOULD BE 9 INSTEAD OF 8

2011 is 475 mod 512 and 4022 is 438 mod 512, so that of the 2012 numbers in the given range, ceil(2012/512) = 4 are divisible by 512, bringing the total to 2008.

SHOULD BE 5 INSTEAD OF 4

I LIST THEM:  1544, 2056, 2568, 3080, 3592

2011 is 987 mod 1024 and 4022 is 950 mod 1024, so that of the 2012 numbers in the given range, ceil(2012/1024) = 2 are divisible by 256, bringing the total to 2010.

THE 256 IS A TYPO: 2 ARE DIVISIBLE BY 1024

2048 is within the range, bringing the final total to 2011.

NO===>

MY CORRECTIONS BRING THE TOTAL TO 2015

Computer verification: verifies following your formulas'

if you just count   you will find where IMHO you've erred.

In my solution , for each n   I found both the highest and the lowest numbers within the range ,divisible byb 2^n and evaluated

(hi-lo)/(2^n)+1  and summed for all n (1 to 11)

I erred, too, but not the way was wrong- I initially thought the  range was 2012-4012 .....

 Posted by Ady TZIDON on 2011-12-05 18:57:03

 Search: Search body:
Forums (0)