Arithmetic derivative: Difference between revisions
Content added Content deleted
m (→{{header|J}}) |
|||
Line 137: | Line 137: | ||
<lang J>D=: {{ +/y%q:1>.|y }}"0</lang> |
<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). |
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: |
Task example: |