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.
Problem 023
Forum rules
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
In particular don't post any code fragments or results.
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Re: Problem 023
Actually, that should probably have been clear from this line of the problem:
Re: Problem 023
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.
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
Hello.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.
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
Thank you very much for the clarification.
Re: Problem 023
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...Zifix wrote:Min Abundant: 12
Max Abundant: 28122
Abundant Cnt: 6965
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
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.
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
No, it only says that analysis cannot reduce that limit further. It even explicitly says
It is actually part of solving this problem that you have to check all the numbers up to 28123.... though it is known that the greatest number that cannot be expressed as the sum of two abundant numbers is less than this limit.
_{Jaap's Puzzle Page}
Problem 23
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 ?
"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
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."
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."
 RobertStanforth
 Administrator
 Posts: 1619
 Joined: Mon Dec 30, 2013 11:25 pm
Re: Problem 023
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 bruteforce 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
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 bruteforce 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
I do not understand the following sentence of the problem statement
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 ?
Does it imply that, it is possible to add 12 twice and get 24 ?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.
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 ?
 kenbrooker
 Posts: 187
 Joined: Mon Feb 19, 2018 3:05 am
 Location: Northern California, USA
Re: Problem 023
Yes, the problem is specifying that "the sum of two abundant numbers" includes using the same abundant number twice.
"Good Judgment comes from Experience;
Experience comes from Bad Judgment..."
Experience comes from Bad Judgment..."

 Posts: 58
 Joined: Fri Sep 20, 2019 1:25 pm
 Location: Minsk
Re: Problem 023
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
Thanks
 kenbrooker
 Posts: 187
 Joined: Mon Feb 19, 2018 3:05 am
 Location: Northern California, USA
Re: Problem 023
Will PM you...
"Good Judgment comes from Experience;
Experience comes from Bad Judgment..."
Experience comes from Bad Judgment..."

 Posts: 1
 Joined: Sat Feb 15, 2020 3:34 pm
Problem 23
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?
<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?
 RobertStanforth
 Administrator
 Posts: 1619
 Joined: Mon Dec 30, 2013 11:25 pm
Re: Problem 023
I have merged your post with the existing topic for Problem 23.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.
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.