Weird numbers: Difference between revisions
→Functional Python: Moved predicate into definition of series
m (→Functional Python: Simplified formulation in terms of concatMap) |
(→Functional Python: Moved predicate into definition of series) |
||
Line 1,464:
(Abundant, but not semi-perfect)
'''
def go(
d = sum(ds) - n▼
return [n] if 0 < d and not hasSum(d, ds) else []▼
return concatMap(go)(count(1))
▲ d = sum(ds) - n
▲ return 0 < d and not hasSum(d, ds)
|