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

Content added Content deleted
(→‎{{header|Python}}: Added a functional composition in Python)
m (→‎Functional Python: Refactored)
Line 917: Line 917:
def a005179():
def a005179():
'''Integer sequence: smallest number with exactly n divisors.'''
'''Integer sequence: smallest number with exactly n divisors.'''
def go(n):
return (
return next(
next(
x for x in count(1)
x for x in count(1)
if n == 1 + len(properDivisors(x))
if n == 1 + len(properDivisors(x))
)
) for n in count(1)
)
return map(go, count(1))