Sequence: smallest number with exactly n divisors: Difference between revisions
Content added Content deleted
m (→Functional Python: Refactored) |
m (→{{header|Haskell}}: Pruned a little noise) |
||
Line 317: | Line 317: | ||
a005179 = |
a005179 = |
||
catMaybes $ |
catMaybes $ |
||
(\n -> find ( |
(\n -> find ((n ==) . succ . length . properDivisors) [1 ..]) <$> [1 ..] |
||
properDivisors :: Int -> [Int] |
properDivisors :: Int -> [Int] |
||
Line 332: | Line 332: | ||
{{Out}} |
{{Out}} |
||
<pre>[1,2,4,6,16,12,64,24,36,48,1024,60,4096,192,144]</pre> |
<pre>[1,2,4,6,16,12,64,24,36,48,1024,60,4096,192,144]</pre> |
||
=={{header|J}}== |
=={{header|J}}== |