Arithmetic derivative: Difference between revisions
m
→{{header|J}}
m (→{{header|J}}) |
|||
Line 137:
<lang J>D=: {{ +/y%q:1>.|y }}"0</lang>
In other words: find the sum of the argument divided by each of the sequence of prime factors of its absolute value (with a special case for zero -- we use the maximum of either 1 or that absolute value when finding the sequence of prime factors).
Task example:
|