Numbers which are the cube roots of the product of their proper divisors: Difference between revisions
Content added Content deleted
m (Python example) |
(J) |
||
Line 19: | Line 19: | ||
<br> |
<br> |
||
=={{header|J}}== |
|||
Note that the cube root of the proper divisors is the fourth root of all divisors of a positive integer. That said, we do not need to find roots here: |
|||
<syntaxhighlight lang=J>F=: ('';1 1 1;1 3;,7) e.~ __ <@/:~@{:@q:"0 ]</syntaxhighlilght> |
|||
Task examples: |
|||
<syntaxhighlight lang=J> N=: 1+I.F 1+i.2^18 |
|||
5 10$N |
|||
1 24 30 40 42 54 56 66 70 78 |
|||
88 102 104 105 110 114 128 130 135 136 |
|||
138 152 154 165 170 174 182 184 186 189 |
|||
190 195 222 230 231 232 238 246 248 250 |
|||
255 258 266 273 282 285 286 290 296 297 |
|||
499{N |
|||
2526 |
|||
4999{N |
|||
23118 |
|||
49999{N |
|||
223735</syntaxhighlight> |
|||
=={{header|Python}}== |
=={{header|Python}}== |
||
Line 55: | Line 74: | ||
Fifty thousandth: 223,735 |
Fifty thousandth: 223,735 |
||
</pre> |
</pre> |
||
=={{header|Raku}}== |
=={{header|Raku}}== |