Sequence: smallest number with exactly n divisors: Difference between revisions
Sequence: smallest number with exactly n divisors (view source)
Revision as of 11:48, 8 March 2021
, 3 years ago→{{header|Ruby}}
Alpha bravo (talk | contribs) (Added AutoHotkey) |
|||
Line 1,372:
return #+1 /*bump "proper divisors" to "divisors".*/</lang>
{{out|output|text= is identical to the 1<sup>st</sup> REXX version.}} <br><br>
=={{header|Ring}}==
<lang ring>
load "stdlib.ring"
see "working..." + nl
see "the first 15 terms of the sequence are:" + nl
for n = 1 to 15
for m = 1 to 4100
pnum = 0
for p = 1 to 4100
if (m % p = 0)
pnum = pnum + 1
ok
next
if pnum = n
see "" + m + " "
exit
ok
next
next
see nl + "done..." + nl
</lang>
{{out}}
<pre>
working...
the first 15 terms of the sequence are:
1 2 4 6 16 12 64 24 36 48 1024 60 4096 192 144
done...
</pre>
=={{header|Ruby}}==
|