Problem 272

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.
Post Reply
ssp
Posts: 2
Joined: Sun Nov 11, 2007 7:49 am

Problem 272

Post by ssp »

Hello,
i've found 63450979 numbers with C(n) = 242 and get wrong answer (3463044300794026317).
Is those numbers near to the right answer?
zwuupeape
Posts: 189
Joined: Tue Jun 09, 2009 6:11 pm

Re: Problem 272

Post by zwuupeape »

There are about twice as many numbers
viv_ban
Posts: 23
Joined: Mon May 26, 2008 3:09 pm

Re: Problem 272

Post by viv_ban »

Somebody please confirm if the answer is 19543219365706 for n <= 3*10^8.
Thanks.
zwuupeape
Posts: 189
Joined: Tue Jun 09, 2009 6:11 pm

Re: Problem 272

Post by zwuupeape »

No, but it's close - the first four digits are good
viv_ban
Posts: 23
Joined: Mon May 26, 2008 3:09 pm

Re: Problem 272

Post by viv_ban »

Thanks zwuupeape for reply. Can you please recheck the value because I am getting the same answer (for 3*10^8) with a completely different algorithm (semi brute force).
zwuupeape
Posts: 189
Joined: Tue Jun 09, 2009 6:11 pm

Re: Problem 272

Post by zwuupeape »

Oh, you are correct. I have a pretty subtle bug there. My program misses exactly one number. I'm surprised it actually works for higher values, now that I think of it :)

So yeah, it's good. Sorry!
viv_ban
Posts: 23
Joined: Mon May 26, 2008 3:09 pm

Re: Problem 272

Post by viv_ban »

hey no problem!
I learned lot of new and interesting things and finally came up with faster and better algorithm.
oleglyamin
Posts: 39
Joined: Mon Aug 08, 2011 8:49 am

Re: Problem 272

Post by oleglyamin »

Could anyone confirm that:

1) there are 663 positive results for n <= 3 * 10^7 for a total of 13166591472.

2) there are 29454 positive results for n <= 3 * 10^8.

Thanks.
oleglyamin
Posts: 39
Joined: Mon Aug 08, 2011 8:49 am

Re: Problem 272

Post by oleglyamin »

Bump. See previous post.

EDIT: Solved.
lld2006
Posts: 8
Joined: Sat Jul 14, 2012 9:53 pm

Re: Problem 272

Post by lld2006 »

oleglyamin wrote:Could anyone confirm that:

1) there are 663 positive results for n <= 3 * 10^7 for a total of 13166591472.

2) there are 29454 positive results for n <= 3 * 10^8.

Thanks.
The result for 3e7 is not correct. It is really misleading.
Jamie
Posts: 11
Joined: Sat Feb 28, 2009 9:40 am

Re: Problem 272

Post by Jamie »

oleglyamin wrote:Could anyone confirm that:

1) there are 663 positive results for n <= 3 * 10^7 for a total of 13166591472.

2) there are 29454 positive results for n <= 3 * 10^8.

Thanks.
Strangely enough, I get these wrong results as well

EDIT: found my issue. Though I probably can't say too much about it.
User avatar
yourmaths
Posts: 47
Joined: Mon Aug 25, 2014 11:00 am

Re: Problem 272

Post by yourmaths »

Jamie wrote: Tue Sep 02, 2014 12:46 am
oleglyamin wrote:Could anyone confirm that:

1) there are 663 positive results for n <= 3 * 10^7 for a total of 13166591472.

2) there are 29454 positive results for n <= 3 * 10^8.

Thanks.
Strangely enough, I get these wrong results as well

EDIT: found my issue. Though I probably can't say too much about it.
OK I have been working on and debugging this problem all day and finally got the "correct wrong" answer above :wink: - anyone who gets this far on the problem surely deserves partial credit.
Last edited by yourmaths on Thu Oct 18, 2018 1:24 am, edited 1 time in total.
level = lambda number_solved: number_solved // 25
Image
User avatar
yourmaths
Posts: 47
Joined: Mon Aug 25, 2014 11:00 am

Re: Problem 272

Post by yourmaths »

For future solvers: if you end up getting the correct wrong answer above, you are about 95% there, and understand the problem well enough to identify the issue and solve it.
level = lambda number_solved: number_solved // 25
Image
mdean
Posts: 206
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 272

Post by mdean »

I think I'm getting close to solving this problem. So far, I have the one value in this thread that's been confirmed (by viv_ban and zwuupeape). I was wondering if I could pm someone who has completed this problem with my value for 3*10^9. If someone could confirm that this value is correct, it would help focus my troubleshooting. If this value is wrong, I could have larger issues, but at least I'd know where to start looking.
Image
MuthuVeerappanR
Posts: 539
Joined: Sun Mar 22, 2015 2:30 pm
Location: India
Contact:

Re: Problem 272

Post by MuthuVeerappanR »

Hi mdean,
If you could PM your value, I can confirm it.
Image
It is not knowledge, but the act of learning, not possession but the act of getting there, which grants the greatest enjoyment.
castrate
Posts: 31
Joined: Mon Aug 19, 2019 2:34 pm

Re: Problem 272

Post by castrate »

I think I'm on the (seemingly)correct way, but the answer was wrong, even not the same with the "correct wrong" answer. Could you please check:
Is the smallest number satisfying C(n)=242 <snipped>?
And is the smallest number satisfying C(n)=242 and not divisible by 9 <snipped>?

Edit: Solved the problem.
Post Reply