Project Euler 23 - Non-abundant sums

Official link: https://projecteuler.net/problem=23

Thought Process

Using a modified Digit sum function which outputs the sum of the proper divisors

  1. I then append all abundant numbers to a list, called abundantnums

  2. I initialise an array = [True]*28124

    • I will then go through abundantnums twice with variables x, y, and if abundantnums[x] + abundantnums[y] < 28124 then we set array[abundantnums[x] + abundantnums[y]] = False. Essentially what we're going to end up with is an array such that array[x] = False if x is not the sum of 2 abundant numbers!

  3. Then I simply need to go through array and sum all the index's where array[x] == False

Interactive Code

No interactive code for this problem, code is included below