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.
User avatar
Tommy137
Posts: 238
Joined: Sun Feb 24, 2008 6:02 pm
Location: Cologne, Germany
Contact:

Re: Problem 23 Hints

Post by Tommy137 »

See: viewtopic.php?f=50&t=1356
Before you start a new topic in this forum, please make sure that a topic for the same problem does not already exist.
If such a topic already exists, please post your question or concern in that topic; it's the only way to keep the number of topics manageable and make it possible to easily search for a specific problem.
Image

iamhigh
Posts: 7
Joined: Fri Apr 03, 2009 10:24 am

Re: Problem 23 Hints

Post by iamhigh »

noted!

iamhigh
Posts: 7
Joined: Fri Apr 03, 2009 10:24 am

Re: Problem 23 Hints

Post by iamhigh »

Need your help one more time folks!

Brute forced and arrived at the solution after 3 mins. Checked the forum for this code which runs way faster! but it is confusing the hell out of me. Can somebody type a few insightful words about this?

I am unsure of the code posting rules for this forum - so i am providing a link here to the problem thread page --> edit. I am referring to the one from JavaManIssa - especially around the expressable array that it uses.

Thanks
Last edited by rayfil on Sat Apr 04, 2009 2:23 am, edited 1 time in total.
Reason: Removed link as precaution

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

Re: Problem 23 Hints

Post by hk »

Please no discussion here.
PM me what you don't understand in that solution.
Image

yashkochar
Posts: 7
Joined: Tue May 12, 2009 3:17 pm

Re: Problem 023

Post by yashkochar »

I guess this statement needs to be rephrased
A number whose proper divisors are less than the number is called deficient and a number whose proper divisors exceed the number is called abundant.

User avatar
Georg
Posts: 157
Joined: Mon Jan 21, 2008 7:00 am
Location: Mannheim, Germany
Contact:

Re: Problem 023

Post by Georg »

yashkochar wrote:I guess this statement needs to be rephrased
A number whose proper divisors are less than the number is called deficient and a number whose proper divisors exceed the number is called abundant.
This means:
A number whose sum of its proper divisors is less than the number is called deficient and a number whose sum of its proper divisors exceeds the number is called abundant.
Update:
Corrected. Thank you hk.
Last edited by Georg on Fri Jun 12, 2009 10:15 am, edited 1 time in total.

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

Re: Problem 023

Post by hk »

Georg wrote:
yashkochar wrote:I guess this statement needs to be rephrased
A number whose proper divisors are less than the number is called deficient and a number whose proper divisors exceed the number is called abundant.
This means:
A number whose sum of its proper divisors are less than the number is called deficient and a number whose sum of its proper divisors exceed the number is called abundant.
Sum is singular so are-->is and exceed-->exceeds
Image

User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 10:15 pm
Location: Bremen, Germany

Re: Problem 023

Post by daniel.is.fischer »

Reads awkwardly. Wouldn't it be better to write "A number for which the sum of its proper divisors ...", as in the first sentence about perfect numbers?
Or "A number n is called deficient if the sum of its proper divisors is less than n and it is called abundant if the sum exceeds n."?
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.

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

Re: Problem 023

Post by hk »

daniel.is.fischer wrote:Reads awkwardly. Wouldn't it be better to write "A number for which the sum of its proper divisors ...", as in the first sentence about perfect numbers?
Or "A number n is called deficient if the sum of its proper divisors is less than n and it is called abundant if the sum exceeds n."?

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

Perhaps even better:
"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."
Image

User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 10:15 pm
Location: Bremen, Germany

Re: Problem 023

Post by daniel.is.fischer »

Yes, that's better. Who's going to change the problem wording?

Edit: I already did.
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.

Zifix
Posts: 1
Joined: Sun Mar 13, 2011 9:35 am

Re: Problem 023

Post by Zifix »

Hi,
I'm struggling to solve this problem. Can somebody please confirm the following stats?
Min Abundant: 12
Max Abundant: 28122
Abundant Cnt: 6965
Min Target: 1
Max Target: 20161
Target Cnt: 1447

As far as I can see they fit the data given posted previously in this thread (20161 being the highest relevant number and 6965 abundant numbers in the range). Are the other ones also OK?
Thanks in advance
Zifix

spade78
Posts: 1
Joined: Sun Apr 03, 2011 2:46 pm

Re: Problem 023

Post by spade78 »

I just solved this one. All the stats are correct except for:
Target Cnt: 1456

yotama9
Posts: 1
Joined: Mon Feb 27, 2012 12:39 pm

Re: Problem 023

Post by yotama9 »

Hi guys.

I'm trying to solve this problem and I can't get the right solution. Is there some milestone results to check my code? (for example, the sum of all the numbers below 1000 which are not the sum of to abundant numbers) This will be very useful for debugging

Thanks.

thundre
Posts: 356
Joined: Sun Mar 27, 2011 9:01 am

Re: Problem 023

Post by thundre »

There are 21 abundant numbers below 100.

The sum of the numbers below 100 that cannot be expressed as the sum of two of these is 2766.

That should help your debugging.
Image

CMinus
Posts: 2
Joined: Sat May 05, 2012 12:19 pm

Some thing wrong with Problem 23 Example

Post by CMinus »

the smallest number that can be written as the sum of two abundant numbers is 24
In fact the first two abundant numbers are 12 , 18 So their sum = 30 !!
Am I right or I have misunderstanding ??

branduren
Posts: 1
Joined: Mon Apr 23, 2012 12:12 am

Re: Some thing wrong with Problem 23 Example

Post by branduren »

Just a little misunderstanding.
12 + 12 = 24
but I guess 30 is the second smallest.

User avatar
rayfil
Administrator
Posts: 1403
Joined: Sun Mar 26, 2006 4:30 am
Location: Ontario, Canada
Contact:

Re: Problem 023

Post by rayfil »

@CMinus

Your post has been merged with the proper thread related to Problem 23.

We realize you are new to this forum. Please read the sticky thread entitled "Comments, questions and clarifications about PE problems". By using the suggested search procedure, you will find that most (if not all) of the older problems already have a thread started for them. And, in many cases, your
inquiry may already have been covered.
When you assume something, you risk being wrong half the time.

CMinus
Posts: 2
Joined: Sat May 05, 2012 12:19 pm

Re: Problem 023

Post by CMinus »

@rayfill I am sorry but , I searched the forum & I didn't find the post !! :)

Artemiye
Posts: 1
Joined: Thu Jun 14, 2012 9:22 pm

Re: Problem 023

Post by Artemiye »

Can someone take a look at my code? It's in C++ - I get an answer that's very close (within ~1000), but obviously not the correct answer.

nebffa
Posts: 1
Joined: Thu Jul 05, 2012 9:07 am

Re: Problem 023

Post by nebffa »

Hi - I just completed problem 023. In my humble opinion, I firmly believe the wording of this question should be changed from
Find the sum of all the positive integers which cannot be written as the sum of two abundant numbers.
to
Find the sum of all the positive integers which cannot be written as the sum of two abundant numbers (the two abundant numbers are allowed to be the same).
I spent some time thinking what was wrong with my code until I realised perhaps the question was ambiguous. Surely enough on changing my "i + 1" to "i" in one of my loops I got the correct answer.


Thankyou for your consideration,

Ben

Post Reply