This is simple program for finding the perfect numbers.
In number theory, a perfect number is a positive integer that is equal to the sum of its positive proper divisors, that is, divisors excluding the number itself. For instance, 6 has proper divisors 1, 2 and 3, and 1 + 2 + 3 = 6
, so 6 is a perfect number. The next perfect number is 28, since 1 + 2 + 4 + 7 + 14 = 28
.
From Wiki
I got inspired by video 'The oldest unsolved problem in math' by Veritasium on YouTube, so i thought 'i want to write it as a program'. And here it is.
Nothing special, just start it in your console.
- C++17 (STL)
- Clang++ 17
- Optimize counting
- Implement multithreading
- Expand counting limits