PerfectNumbers
The perfect numbers -- integers equal to the sum of their proper divisors -- as a lazy indexed collection.
OEIS
A000396mathlib4Nat.PerfectPerfectNumbersthe with , an indexed collection of unknown count.Details
- : every even perfect number is for a Mersenne prime exponent (Euclid–Euler), but whether any odd perfect number exists -- and so whether the family is even finite or infinite -- is open.
- reads off a table of the known even perfect numbers that fit an exact JS integer (); past that table it returns unevaluated rather than scanning forever, since no predicate here could safely keep searching.
- OEIS A000396. Membership goes through Element: is true, is false (abundant, not perfect).
Enumeration
Examples
2 more kept as data, checked against the oracles See also: Count, At, Element, AbundantNumbers, SemiperfectNumbers