A cute number theory problem!

Number Theory Level pending

In the series 2006 ,2007, 2008 ………. 4015 find the summation of the maximum odd divisor of every number?


The answer is 4035074.

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.

2 solutions

Akash Hossain
Feb 20, 2018

As stated in the problem,we need the max odd divisor of each number,we can't have the powers of 2 as the factor of every number.An interesting thing to notice here that all the odd numbers in the series are the max odd divisor of themselves.So we have to work with the even number.We can write all the even number in the series taking the powers of '2' like this: 2 * 1003,2 * 1005,2 * 1007,..........,2 * 2007, 4 * 503,4 * 505,........,4 * 1003, 8 * 251,.......,8 * 501, 16 * 127,..........,16 * 249, 32 * 63,........,32 * 125, 64 * 33,........,64 * 61, 128 * 17,.........,128 * 31, 256 * 9,.......,256 * 15, 512 * 5,....,512 * 7, 1024 * 3, 2048 * 1, This step is really boring.But the bright day is ahead!Now we have to sum up all the odd number stated in the previous step.The sum of odd numbers as a factor with '2' is (1004^2-501^2),like this,the sum of the odd number as a factor with the power of '2' are (502^2 -251^2),(251^2-125^2),(125^2-63^2),(63^2-31^2),(31^2-16^2),(16^2-8^2),(8^2-4^2),(4^2-2^2),3,1(as the sum of the first nth odd number is n^2).Adding all these we get a sum of (1004^2-501^2+502^2)=1009019.And the sum of the odd numbers from 2007 to 4015 in the series is 2008^2-1003^2=3026055.So the final answer is 1009019+3026055=4035074.Done!

Giorgos K.
Feb 19, 2018

Mathematica

Sum[Max@Select[Divisors@i, OddQ], {i, 2006, 4015}]

returns 4035074

I posted the question to test mathematical skill,not to test programming skill.

Akash Hossain - 3 years, 3 months ago

Log in to reply

just a tip for your next challenges: If you want to avoid brute force approaches, use bigger numbers. You should not tell people how to solve a problem. Have you ever heard of ProjectEuler? (have a look at their number-theory problems)

Giorgos K. - 3 years, 3 months ago

Log in to reply

Thanks for your tip.I will try to follow your 'special' tip.But I think I used big numbers enough in my problem.What is left is your 'valuable' opinion.

Akash Hossain - 3 years, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...