Sequence: smallest number with exactly n divisors: Difference between revisions
Sequence: smallest number with exactly n divisors (view source)
Revision as of 18:52, 11 April 2019
, 5 years agoAdded Sidef
(→{{header|Kotlin}}: Changed 15 to MAX) |
(Added Sidef) |
||
Line 308:
14 192
15 144
</pre>
=={{header|Sidef}}==
<lang ruby>func n_divisors(n) {
1..Inf -> first_by { .sigma0 == n }
}
say 15.of { n_divisors(_+1) }</lang>
{{out}}
<pre>
[1, 2, 4, 6, 16, 12, 64, 24, 36, 48, 1024, 60, 4096, 192, 144]
</pre>
|