The Lagarias arithmetic derivative
is defined for integers such that the derivative of a prime number is 1:
. It also satisfies the Leibniz formula, which resembles the product rule of calculus:
For example, the arithmetic derivative of 15 is
. The Leibniz formula also implies that
.
Write a function to compute the arithmetic derivative of a natural number.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers26
Suggested Problems
-
Return the largest number that is adjacent to a zero
5525 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
2052 Solvers
-
434 Solvers
-
948 Solvers
-
12828 Solvers
More from this Author323
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!