"Just like in [problem 21](https://projecteuler.net/problem=21), we'll define an `aliquot_sum` function and use that to find all the [abundant numbers](https://en.wikipedia.org/wiki/Abundant_number) below 28,124 (as in problem 21, we could instead use a sieve to compute the divisor sums)."
"abundant_numbers = {k for k in range(1, 28124) if aliquot_sum(k) > k}"
]
},
{
"cell_type": "markdown",
"id": "d6586d17",
"metadata": {},
"source": [
"Then we check every integer less than 28,124 to see if it's the sum of any two abundant numbers, and if it is, remove it from a set containing all those integers. Whatever's left in that set are the non-abundant sums."
"* Numbers that are not the sum of two abundant numbers: [A048242](https://oeis.org/A048242)\n",
"\n",
"#### Copyright (C) 2025 filifa\n",
"\n",
"This work is licensed under the [Creative Commons Attribution-ShareAlike 4.0 International license](https://creativecommons.org/licenses/by-sa/4.0/) and the [BSD Zero Clause license](https://spdx.org/licenses/0BSD.html)."