#include <stdio.h>
#include <math.h>
// abundant odd number = sum of proper divisors > number
unsigned SumOddNumberProperDivisors(const unsigned num) {
unsigned sum = 1;
for (unsigned i = 3, j; i < sqrt(num) + 1; i += 2)
if (num % i == 0)
sum += i + (i == (j = num / i) ? 0 : j);
return sum;
}
int main()
{
for (unsigned num = 1, i = 0; i < 25; num += 2) {
if (SumOddNumberProperDivisors(num) > num) {
printf("%u: %u\n", ++i, num);
}
}
return 0;
}
/*
run:
1: 945
2: 1575
3: 2205
4: 2835
5: 3465
6: 4095
7: 4725
8: 5355
9: 5775
10: 5985
11: 6435
12: 6615
13: 6825
14: 7245
15: 7425
16: 7875
17: 8085
18: 8415
19: 8505
20: 8925
21: 9135
22: 9555
23: 9765
24: 10395
25: 11025
*/