CMIMC 2017 Number Theory Problem 7

The arithmetic derivative D(n) of a positive integer n is defined via the following rules:

  • D(1)=0
  • D(p)=1 for all primes p;
  • D(a b)=D(a) b+a D(b) for all positive integers a and b.

Find the sum of all positive integers n below 1000 satisfying D(n)=n.