euler-0.1.0.0

Safe HaskellSafe
LanguageHaskell2010

Euler.Util.Amicable

Description

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

Documentation

amicableNumbers :: Integer -> [Integer] Source #

amicableNumbers n gives all of the amicable numbers on the inclusive range [2, n], in ascending order.