Problem 023

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
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.

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


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
mdean
Posts: 156
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 023

Post 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.
Image

User avatar
SoboLAN
Posts: 39
Joined: Sat Aug 18, 2012 3:21 pm

Re: Problem 023

Post 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.
Image

User avatar
TheEvil
Posts: 84
Joined: Sun Nov 13, 2011 10:38 am
Location: Szeged, Hungary

Re: Problem 023

Post 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.
Image

User avatar
SoboLAN
Posts: 39
Joined: Sat Aug 18, 2012 3:21 pm

Re: Problem 023

Post by SoboLAN »

Thank you very much for the clarification.
Image

Flood
Posts: 7
Joined: Wed May 15, 2013 4:53 pm

Re: Problem 023

Post 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.

elyashiv
Posts: 1
Joined: Tue Aug 06, 2013 3:29 pm

Problem 023

Post 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.

User avatar
jaap
Posts: 550
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: mistake(?) in problem 23

Post 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.

Liad777
Posts: 3
Joined: Mon May 07, 2018 1:33 pm

Problem 23

Post 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 ?

User avatar
hk
Administrator
Posts: 10712
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 023

Post 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."
Image

User avatar
RobertStanforth
Administrator
Posts: 1239
Joined: Mon Dec 30, 2013 11:25 pm

Re: Problem 023

Post 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

c0rec0de
Posts: 2
Joined: Mon Aug 27, 2018 10:36 am

Re: Problem 023

Post 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 ?

User avatar
kenbrooker
Posts: 140
Joined: Mon Feb 19, 2018 3:05 am
Location: Northern California, USA

Re: Problem 023

Post by kenbrooker »

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
..."
Image

c0rec0de
Posts: 2
Joined: Mon Aug 27, 2018 10:36 am

Re: Problem 023

Post by c0rec0de »

Thank you.

Junglemath
Posts: 27
Joined: Fri Sep 20, 2019 1:25 pm

Re: Problem 023

Post 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

User avatar
kenbrooker
Posts: 140
Joined: Mon Feb 19, 2018 3:05 am
Location: Northern California, USA

Re: Problem 023

Post by kenbrooker »

Will PM you...
"Good Judgment comes from Experience;
Experience comes from Bad Judgment
..."
Image

ShakibSharifi
Posts: 1
Joined: Sat Feb 15, 2020 3:34 pm

Problem 23

Post 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?

User avatar
RobertStanforth
Administrator
Posts: 1239
Joined: Mon Dec 30, 2013 11:25 pm

Re: Problem 023

Post 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.

Post Reply