Hint 1 Project Euler Problem 484 Arithmetic Derivative

Arithmetic Derivative

Problem 484

The arithmetic derivative is defined by
  • p' = 1 for any prime p
  • (ab)' = a'b + ab' for all integers ab (Leibniz rule)
For example, 20' = 24
Find ∑ gcd(k,k') for 1 < k ≤ 5·1015
Note: gcd(x,y) denotes the greatest common divisor of x and y.


If k=p1^a1 * p2^a2 * ... * pn^an
Then k' = a1*p1^(a1-1)*(k/(p1^a1)) + ... + an*pn^(an-1)*(k/(pn^an))
k' = k*(a1/p1 + a2/p2 + ... + an/pn)

It is easy to conduct that,
unless exists pi|ai, gcd(k,k') = k/(p1*p2*...*pn)

If exists pi|ai, then we have a bonus pi in gcd,
gcd(k,k') = k/(p1*p2*...*pn) * pi

The next step is how do we sum it up within reasonable complexity.

---------------------

The opinion above is original and unproven work. Please correct me if I made a mistake.
Please tell me if you have reached the correct answer using the methods above.
I am just too lazy to calculate that. :)



Comments

Popular posts from this blog

Project Euler Problem 684 Inverse Digit Sum - Solution

Project Euler Problem 686 Powers of Two - Solution

Project Euler Problem 717 Summation of a Modular Formula - Solution