Numbers which are the cube roots of the product of their proper divisors: Difference between revisions

add RPL
(Created Nim solution.)
(add RPL)
Line 1,701:
 
Fifty thousandth: 223,735</pre>
=={{header|RPL}}==
<code>PRODIV</code> is defined at [[Product of divisors#RPL|Product of divisors]]
{{works with|Halcyon Calc|4.2.7}}
≪ DUP <span style="color:blue">PRODIV</span> OVER / SWAP DUP DUP * * == ≫ '<span style="color:blue">OK?</span>' STO
 
≪ { } 0 '''WHILE''' OVER SIZE 50 < '''REPEAT''' 1 + '''IF''' DUP <span style="color:blue">OK?</span> '''THEN''' SWAP OVER + SWAP '''END END''' ≫ EVAL
≪ 0 0 '''WHILE''' OVER 4 PICK < '''REPEAT''' 1 + '''IF''' DUP <span style="color:blue">OK?</span> '''THEN''' SWAP 1 + SWAP '''END END''' ≫ '<span style="color:blue">TASK</span>' STO
500 <span style="color:blue">TASK</span>
5000 <span style="color:blue">TASK</span>
{{out}}
<pre>
3: { 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 }
2: 2526
1: 23118
</pre>
 
=={{header|Ruby}}==
<syntaxhighlight lang="ruby" line>require 'prime'
1,151

edits