Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 472 Bytes

README.md

File metadata and controls

14 lines (11 loc) · 472 Bytes

Perfect numbers

Please refer to my article on Medium.

Example

const perfectNumsCalc = new PerfectNumbersCalculator({max: 100});
perfectNumsCalc.findPerfects(); // Result: [6, 28]
perfectNumsCalc.setNewMaximum({max: 10000});
perfectNumsCalc.findPerfects(); // Result: [6, 28, 496, 8128]
perfectNumsCalc.checkIfPerfect(777); // false
perfectNumsCalc.checkIfPerfect(33550336); // true