Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Let d(n) be defined as the sum of proper divisors of n.
If d(a) = b and d(b) = a, where a ≠ b, then a and b are an amicable pair and each of a and b are called amicable numbers.
Amicable numbers are defined in Euler problem 21.
Synopsis
- amicableNumbers :: Integer -> [Integer]
Documentation
amicableNumbers :: Integer -> [Integer] Source #
gives all of the amicable numbers on the inclusive
range [2, n], in ascending order.amicableNumbers
n