What is the smallest positive integer n such that k = 1 ∑ n k 2 is divisible by 1 0 0 0 ?
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.
It is necessary and sufficient that: either n or n + 1 is divisible by 1 6 and either n , n + 1 , or 2 n + 1 is divisible by 1 2 5 . This leads to six different Chinese Remainder Theorem computations mod 2 0 0 0 , which end up as 0 , 6 2 4 , 6 8 7 , 1 3 1 2 , 1 3 7 5 , 1 9 9 9 . The smallest positive integer in these congruence classes is 6 2 4 .
Log in to reply
Right, of course. ( 2 n + 1 ) is always odd, and one of n , ( n + 1 ) is always odd, so we require that either n or ( n + 1 ) be divisible by 1 6 . And as Rahul points out, divisibility of the product by 3 is already guaranteed.
The CRT tightens the process considerably. Thanks for the refinements. :)
Just a slight improvement. n ( n + 1 ) ( 2 n + 1 ) is always divisible by 3 ,so we don't need to see every time if the expression is divisible by 3 or not.
Just to clarify a bit more:many might ask why we are taking the 2 under consideration,since there is always a factor of 2 in n ( n + 1 ) ( 2 n + 1 ) ,but the thing is that if we do not take that under consideration,then we may include the cases where 2 3 ∣ n ( n + 1 ) ( 2 n + 1 ) but 2 4 does not divide n ( n + 1 ) ( 2 n + 1 ) .
Log in to reply
Ah, yes. If n ≡ 0 m o d 3 then the product is divisible by 3 ; if n ≡ 2 m o d 3 then ( n + 1 ) is divisible by 3 and hence so is the product; and if n ≡ 1 m o d 3 then ( 2 n + 1 ) is divisible by 3 .
So after the divisibility by 1 2 5 criterion is met, the only other criterion is that the product is divisible by 2 4 = 1 6 .
Python:
1 2 3 4 5 6 |
|
Just for fun i tried to write a c ++ program. And found the out put as 624.
Here is the code if your interested http://pasted.co/b8faefe2
Problem Loading...
Note Loading...
Set Loading...
We are looking for the least positive integer n such that 6 n ( n + 1 ) ( 2 n + 1 ) is divisible by 1 0 0 0 , i.e., such that n ( n + 1 ) ( 2 n + 1 ) is divisible by 6 0 0 0 .
Now 6 0 0 0 = 2 4 ∗ 3 ∗ 5 3 . So since n , ( n + 1 ) and ( 2 n + 1 ) are relatively prime for any positive integer n , we know that one of them is divisible by 1 2 5 . The least possible n for which this can happen is n = 6 2 , which makes 2 n + 1 = 1 2 5 . But 6 2 ∗ 6 3 is not divisible by 2 4 ∗ 3 , so we will need to advance to the next smallest n , which will be n = 1 2 4 , which makes n + 1 = 1 2 5 . But 1 2 4 ∗ 2 4 9 is not divisible by 2 4 ∗ 3 , so we need to advance to the next smallest n .
Now we need to move through the sequence of increasing possible values of n based on the "divisibility by 1 2 5 " criterion to find a product n ( n + 1 ) ( 2 n + 1 ) that is also divisible by 2 4 ∗ 3 . The sequence of such n goes as follows:
6 2 , 1 2 4 , 1 2 5 , 1 8 7 , 2 4 9 , 2 5 0 , 3 1 2 , 3 7 4 , 3 7 5 , 4 3 7 , 4 9 9 , 5 0 0 , 5 6 2 , 6 2 4 .
Only once we reach 6 2 4 ∗ 6 2 5 ∗ 1 2 4 9 = 2 4 ∗ 3 ∗ 5 4 ∗ 1 3 ∗ 1 2 4 9 do we have all the prime divisors in sufficient powers to satisfy the divisibility by 6 0 0 0 requirement. Thus the least such value n is 6 2 4 .
I know that there is a less "bashy" substitute for the last stage of my solution, but for now I just wanted to get a solution posted and I'll worry about tightening it up later.