Sum of greatest odd divisor of numbers

Revision en3, by Capta1n_Shy, 2021-09-20 11:49:11

Today, I get a problem.

Sum of greatest odd divisor of numbers in range $$$[a, b]$$$ with $$$a, b <= 10^9$$$

I found solution here : https://www.geeksforgeeks.org/sum-of-greatest-odd-divisor-of-numbers-in-given-range/

But I think the solution is not clear for the even number case.

Can find a better solution or more detailed explanation ?

Sorry, my english was bad.

Thanks you.

Tags number theory, divisors, math, mathematics

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Capta1n_Shy 2021-09-20 11:49:11 0 (published)
en2 English Capta1n_Shy 2021-09-20 11:39:44 2 Tiny change: ' my englist was bad.\' -> ' my english was bad.\' (saved to drafts)
en1 English Capta1n_Shy 2021-09-20 09:08:41 430 Initial revision (published)