Abundant work

We call a positive integer n n abundant if the sum of its proper divisors is greater than itself.

For example, 18 is abundant because the sum of its proper divisors ( 1 + 2 + 3 + 6 + 9 ) (1+2+3+6+9) is greater than itself.

What is the smallest odd abundant number?


The answer is 945.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import java.lang.reflect.Array;
import java.util.Arrays;
public class Main {
    public static int divisors(int a, int b){
        if(a%b==0){
            return b;
        }else {
            return 0;
        }
    }
    public static void main(String[] args) {
        int no;
        int[] sum =new int[100000];
        Arrays.fill(sum, 0);
        for(int i=2;true;i++) {
            for (int j = 1; j < i; j++) {
                sum[i - 1] += divisors(i, j);
            }
            if (sum[i - 1] > i && sum[i - 1] != 0 && i % 2 != 0) {
                System.out.println("The sum of Divisors of " + i+ " is " + sum[i - 1]);
                break;
            }
        }
    }
}

There is an easier approach that doesn't require testing all cases.

HInt: How is the sum of all divisors calculated?

Calvin Lin Staff - 4 years ago
Valerie Wong
Jan 17, 2021

While the first even abundant number is 12 = 2 2 ⋅  3, with σ (12) = 2 3  −  1 2  −  1  ⋅  (3 + 1) = 7 ⋅  4 = 28 > 24 = 2 ⋅  12 , the first odd abundant number (which happens to be the 232nd abundant number) is: 945 = 3 3 ⋅  5 ⋅  7 = 1 ⋅  3 ⋅  5 ⋅  7 ⋅  9 = 9!! (the double factorial of 9), with σ (945) = 3 4  −  1 3  −  1  ⋅  (5 + 1) ⋅  (7 + 1) = 40 ⋅  6 ⋅  8 = 1920 > 1890 = 2 ⋅  945 . {945, 1575, 2205, 2835, 3465, 4095, 4725, 5355, 5775, 5985, 6435, 6615, 6825, 7245, 7425, 7875, 8085, 8415, 8505, 8925, 9135, 9555, 9765, 10395, 11025, 11655, 12285, 12705, 12915, 13545, 14175, ...}

But how do you get this value (and the subsequent smallest odd abundant numbers) without asking Google?

Pi Han Goh - 4 months, 3 weeks ago
Hasmik Garyaka
Sep 22, 2017

If n = p q n=p^q sumofalldivs= 1 + p + . . . + p q 1 1+p+...+p^{q-1} If n=mk and m and k are relatively prime, f(m) f(k)=f(mk) So abundant number needs to be product of several primes. 945=3 3 3 5*7

Do you know that the smallest possible odd abundant number is 3 * 3 * 3 * 5 * 7?

Pi Han Goh - 3 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...