Skip to content

SemiperfectNumbers ​

The semiperfect numbers 6,12,18,20,…6, 12, 18, 20, … -- integers equal to a sum of some subset of their proper divisors -- as a lazy indexed collection.

SemiperfectNumbersthe nn with a proper-divisor subset summing to nn, an infinite indexed collection.

Domain: Collections

Details
  • A lazy indexed collection: Count(SemiperfectNumbers)=+∞Count(SemiperfectNumbers) = +\infty (every perfect number is trivially semiperfect, taking the whole divisor set), and AtAt unranks the kk-th by scanning forward, testing each candidate with a subset-sum search over its proper divisors.
  • OEIS A005835.
  • Membership goes through Element: Element(12,SemiperfectNumbers)Element(12, SemiperfectNumbers) is true (12=2+4+612 = 2 + 4 + 6), Element(70,SemiperfectNumbers)Element(70, SemiperfectNumbers) is false -- 7070 is abundant but [[WeirdNumbers|weird]].

Enumeration

Examples

1 more kept as data, checked against the oracles
About
Examples1
CrosswalkOEISmathlib4

See also: Count, At, Element, PerfectNumbers, WeirdNumbers