Jump to content

Sequence: smallest number with exactly n divisors: Difference between revisions

Added 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>
2,747

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.