Question

http://projecteuler.net/problem=23

I am not looking for an answer . but can somebody explain me what does this means ?

As 12 is the smallest abundant number, 1 + 2 + 3 + 4 + 6 = 16, the smallest number that can be written as the sum of two abundant numbers is 24.

if 12 is smallest abundant number , how come 24 is smallest abundant number that can be written as sum of 2 abundant numbers ?

Problem Text

A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a perfect number.

A number n is called deficient if the sum of its proper divisors is less than n and it is called abundant if this sum exceeds n.

As 12 is the smallest abundant number, 1 + 2 + 3 + 4 + 6 = 16, the smallest number that can be written as the sum of two abundant numbers is 24. By mathematical analysis, it can be shown that all integers greater than 28123 can be written as the sum of two abundant numbers. However, this upper limit cannot be reduced any further by analysis even though it is known that the greatest number that cannot be expressed as the sum of two abundant numbers is less than this limit.

Find the sum of all the positive integers which cannot be written as the sum of two abundant numbers.

Was it helpful?

Solution

Let n be a number.

  • If the (sum of proper divisors of n) equals n, then n is perfect.

    For example, 6 is perfect, because 1 + 2 + 3 = 6.

  • If the (sum of proper divisors of n) is less than n, then n is deficient.

    For example, 5 is deficient, because 1 < 5.

  • If the (sum of proper divisors of n) is greater than n, then n is abundant.

    As said in the text, for example 12 is abundant, because 1 + 2 + 3 + 4 + 6 > 12.

That said, if 12 is the smallest abundant number and we need to find an abundant number that is a sum of two abundant numbers, the smallest one we can check is the sum of twice the minimal one!

We need A and B such that A + B = C where A, B, C are abundant.

12 is the minimal abundant number and can be both A and B. There's nowhere said that the numbers have to be different. The definitions in Project Euler are pretty well worded, don't assume things that aren't said unless you can prove them. This is math, not a trick question.

Therefore, since A and B can be both 12, the smallest number to look at is 12 + 12 = 24. Which is abundant.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top