Page 1 of 2

Problem 233

Posted: Fri Mar 20, 2009 10:15 am
by SmuK
Can someone confirm these results for Problem 233 (View Problem)?

Some random values of N such that f(N) = 420: 1328125, 84246500, 248431625.
My code compute approx 10^7 such numbers <= 10^11.

Thanks in advance.

Re: Problem 233

Posted: Fri Mar 20, 2009 10:45 am
by Tommy137
SmuK wrote:Some random values of N such that f(N) = 420: 1328125, 84246500, 248431625.
f(1328125) = 180

f(84246500) = f(248431625) = 420

Re: Problem 233

Posted: Fri Mar 20, 2009 3:34 pm
by SmuK
"Congratulations, the answer you gave to problem 233 is correct."

Thanks a lot. It was a stupid bug :)

Re: Problem 233

Posted: Mon Apr 20, 2009 6:25 pm
by hisoka-san
My code returns 30875234922 for n<=38000000, is it correct?

Re: Problem 233

Posted: Mon Apr 20, 2009 6:40 pm
by daniel.is.fischer
Yes.

Re: Problem 233

Posted: Mon Apr 27, 2009 4:27 pm
by quintana
for n<=10^10 i have 2709499279563106.
is it correct?

Re: Problem 233

Posted: Mon Apr 27, 2009 4:49 pm
by Tommy137
quintana wrote:for n<=10^10 i have 2709499279563106.
is it correct?
Unfortunately, it's not.

You aren't the first one to get this particular result, though.

Re: Problem 233

Posted: Mon Apr 27, 2009 4:52 pm
by quintana
it's interesting because i have correct answer for 38000000. thanks!

Re: Problem 233

Posted: Tue Apr 28, 2009 7:25 pm
by quilan
Yeah, you're on the right track, but are missing something that a lot of other people missed initially too.

Re: Problem 233

Posted: Wed Apr 29, 2009 7:32 pm
by Tommy137
quintana wrote:it's interesting because i have correct answer for 38000000. thanks!

It seems you got it now ;)

Congratulations!

Re: Problem 233

Posted: Thu Apr 30, 2009 6:31 pm
by quintana
thanks, i got it allright! i got the idea long time ago, but like p180 this one had a catch beyond idea. again, forum was very helpfull.

Re: Problem 233

Posted: Sun Jun 07, 2009 12:07 am
by hendrikS
Just a quick question for clarification:

"sum of the integers": Does it mean sum of the coordinates, that are integers up to 10^11? And if so: X or Y :?:

Re: Problem 233

Posted: Sun Jun 07, 2009 3:34 am
by rayfil
What is the sum of all positive integers N
The actual value of the other integer coordinates on the circles are immaterial. Look at the definition given for f(N).

Re: Problem 233

Posted: Wed Aug 24, 2011 3:50 pm
by thundre
quilan wrote:Yeah, you're on the right track, but are missing something that a lot of other people missed initially too.
I have an elegant algorithm that gives the same wrong results for 1e10, 1e11 and the correct one for 38e6. I don't see any way it could be double-counting solutions.

Now I'm running a brute-force check counting down from 1e10 to see where it's making the mistake. It's taking forever. AAARGH! Would it help if I pull my hair out?

Seriously, this isn't something dumb like an overflow bug, is it?

update: Got it! It wasn't an overflow bug, I just had to look a little deeper into the characteristics of f().

Re: Problem 233

Posted: Wed Sep 28, 2011 8:12 am
by ffff0
Same as everyone. As for now, i can't see any difference for even and odd N. And i can't understand why answer for 38000000 is correct and answer for 10^11 is not. I simply don't see any special cases between this numbers.

My code finds 5422051 solutions for 10^11. Is it too big or too small?

Update: Wait a bit, I've got an idea.

Update 2: And hero have won once again without any help!
There are 5422629 solutions in total and there is no difference between even and odd N. It's something else.

Re: Problem 233

Posted: Tue Dec 20, 2011 12:41 am
by amidar1
The subject of N <= 10^10 came up, but without a definitive response. Can anyone tell me if the correct answer for 10^10 is...

2709680426923506

It's very close to what quintana had, but not quite the same.
I'm getting the right answer for N <= 38 million (though I'm not sure what was special about the number 38 million), but evidently not the right answer for N <= 10^11, and it's driving me a little nuts.

Thanks!

Re: Problem 233

Posted: Tue Dec 20, 2011 3:36 am
by ffff0
Sorry, it's too small.

Re: Problem 233

Posted: Tue Dec 20, 2011 12:34 pm
by amidar1
Sorry, small bug.

for N <= 10^10: 2710041165705856 ?

EDIT:
Nevermind! Introduced another small bug while fixing the first. Now they're both fixed! :D

Re: Problem 233

Posted: Thu Dec 29, 2011 5:43 pm
by TheEvil
Thank you for all the very helpful comments on this question. It helped me a lot when I saw a lot of other people missed one little thing. After I found that I felt I should give my diploma back. :)
So far one of the best problems I solved, even if it took me three days to solve it, but it worth.

Re: Problem 233

Posted: Thu Mar 01, 2012 1:17 pm
by snapey1979
Thanks to all posters above. I have to say that the open forum was great for this one - thanks for giving a sample answer for the problem on toy scale. When I realised my answer for 38000000 was wrong, i went hunting...

Helped me find a stupid bug using a less than instead of less than equals!!!! I'd had the code right since first writing it but for this bug!

Probably the hardest one I solved so far. Got the idea quite quickly, but debugging was a nightmare.