Page 3 of 3

Re: Problem 023

Posted: Thu Jul 05, 2012 10:27 am
by mdean
Actually, that should probably have been clear from this line of the problem:
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.

Re: Problem 023

Posted: Thu Aug 23, 2012 9:47 am
by SoboLAN
Hi,

I have a question about this one: In the problem it states that "As 12 is the smallest abundant number...." . Is this really true ? Let's take the number 11. Its proper divisors are 1 and 11 (since it's prime). 1 + 11 = 12, which means it's abundant.

Actually all prime numbers are abundant. Are they implicitely excluded from this list or ... ?

Can someone please clarify this ? Thanks.

Re: Problem 023

Posted: Thu Aug 23, 2012 10:00 am
by TheEvil
SoboLAN wrote:Hi,

I have a question about this one: In the problem it states that "As 12 is the smallest abundant number...." . Is this really true ? Let's take the number 11. Its proper divisors are 1 and 11 (since it's prime). 1 + 11 = 12, which means it's abundant.

Actually all prime numbers are abundant. Are they implicitely excluded from this list or ... ?

Can someone please clarify this ? Thanks.
Hello.
Proper divisors of n are the divisors of n less than itself. So all prime numbers are deficient since the sum of their proper divisor(s) is 1. And considering your defintion of abundant number, it is easy to see where it has gone wrong, since every number would be abundant since 1 and n are divisors for all n, not just primes.

Re: Problem 023

Posted: Thu Aug 23, 2012 1:57 pm
by SoboLAN
Thank you very much for the clarification.

Re: Problem 023

Posted: Wed May 15, 2013 5:03 pm
by Flood
Zifix wrote:Min Abundant: 12
Max Abundant: 28122
Abundant Cnt: 6965
Hi all, as someone already posted before, those seem to be correct stats from the problem. The thing is I get to that point, and all are fine, but from there I don't know how to check for all the numbers below 28124 if they are a sum of 2 abundant numbers. I've written some loops but they took way too long/don't even finish...

I'm doing it on Python (quite new to it) and I have a list "A" containing all the abundant numbers in that interval. Should I make a new list "B" containing every single possible sum of two of my numbers from "A" below 28123? I tried that already but didn't come up with the correct answer, my code was a bit of a mess, I admit. Any recommendations?

Thank you.

Problem 023

Posted: Tue Aug 06, 2013 3:36 pm
by elyashiv
Hi,
when I started to try solving Problem 23 (View Problem) I searched the web for information about abundant numbers.
I fond an article in wolfram math world, and there it said that any number above 20161 can be expressed as a sum of two abundant numbers.
In the problem it said that the min value known today is 28123.

Re: mistake(?) in problem 23

Posted: Tue Aug 06, 2013 4:14 pm
by jaap
No, it only says that analysis cannot reduce that limit further. It even explicitly says
... though it is known that the greatest number that cannot be expressed as the sum of two abundant numbers is less than this limit.
It is actually part of solving this problem that you have to check all the numbers up to 28123.

Problem 23

Posted: Mon May 07, 2018 1:36 pm
by Liad777
In the question it says,
"By mathematical analysis, it can be shown that all integers greater than 28123 can be written as the sum of two abundant numbers"

but in wikipedia and in prime glossary it says

"Every integer greater than 20161 can be written as the sum of two abundant numbers"

So I wonder If I am missing something here ?

Re: Problem 023

Posted: Mon May 07, 2018 2:06 pm
by hk
Yes, you missed the next sentence of the problem description:
The problem says:
" 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."

Re: Problem 023

Posted: Mon May 07, 2018 2:10 pm
by RobertStanforth
Dear Liad777,

I have moved your post to the existing thread for this problem. In general, the "Problem xxx" naming convention (with leading zeros) in this forum means it should be possible to find such threads where they already exist.

As for your question, 28123 is merely an upper bound that you are given. It was chosen based on some (unspecified) mathematical analysis. That upper bound can be tightened, but only by brute-force computation, not by pure mathematical analysis.

There are some relevant links that you might find interesting at the beginning of this thread:
viewtopic.php?f=50&t=985#p11199

Re: Problem 023

Posted: Mon Aug 27, 2018 11:21 am
by c0rec0de
I do not understand the following sentence of the problem statement
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.
Does it imply that, it is possible to add 12 twice and get 24 ?

It says that 12 is the smallest abundant number. The smallest sum of two abundant number is 24. That gives the only possiblility of 12 + 12.

am I missing something or it is possible to add same number twice ?

Re: Problem 023

Posted: Mon Aug 27, 2018 7:24 pm
by kenbrooker
Yes, the problem is specifying that "the sum of two abundant numbers" includes using the same abundant number twice.

Re: Problem 023

Posted: Tue Aug 28, 2018 7:22 am
by c0rec0de
Thank you.

Re: Problem 023

Posted: Fri Sep 27, 2019 10:26 pm
by Junglemath
I got the right answer but my program runs for more than 2 minutes. I thought I was doing the minimum number of calculations but I do not see what I can improve. Can someone take a look at my code for efficiency?

Thanks

Re: Problem 023

Posted: Sat Sep 28, 2019 3:43 am
by kenbrooker
Will PM you...

Problem 23

Posted: Sat Feb 15, 2020 4:26 pm
by ShakibSharifi
Hello guys, I started to solve Project Euler problems recently, I wrote below code to prevent adding duplicate items to collection but it returns incorrect answer at the end.

<code removed by moderator>

But when I remove ( abundantSums.Contains((abundantNumbers[ i ] + abundantNumbers[j]))==false) in condition, it returns correct answer very late.
Can someone explain why first code doesn't work properly?

Re: Problem 023

Posted: Sat Feb 15, 2020 4:37 pm
by RobertStanforth
ShakibSharifi wrote: Sat Feb 15, 2020 4:26 pm Hello guys, I started to solve Project Euler problems recently, I wrote below code to prevent adding duplicate items to collection but it returns incorrect answer at the end.
I have merged your post with the existing topic for Problem 23.
Please do not post code (or other aids to solving) in this forum, as this may spoil the problem for those who have not yet solved it.
As you have already solved the problem, the right place to pose your question is in the private thread for Problem 23 on the main projecteuler.net site.