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
Problem 439 (View Problem)
I've been working on S(N) for N < 100, and occasionally trying the test case 103 and larger N. The times were getting bad too fast so I wrote a skeleton program
nMax Prog1 Prog2
10^3 0.001 s 0.497 s
10^4 0.009 s 48.622 s
10^5 0.110 s 5534.003 s
10^6 1.119 s
10^7 11.015 s
10^8 110.096 s
My current not-too-brilliant version:
10^3 563576517282 60.325 s
The solution is probably less complex than prog2, but can it really beat prog1?
I'm thinking there's a problem with my machine or my machine+language is not sufficient to solve this problem.
jpatou wrote:I'm really struggling with this one. Can someone check if S(10^8)
for me, it's still a miracle. My impl gives me the right results for the given examples. Also with S(10^8) I get the same result.
Just my final result with S(10^11) isn't accepted on PE-Page. The summed divisors are stored/calculated with BitInteger-Classes.
If you are fairly certain that there is no overflow, then it could be a modular arithmetic issue instead. I'll try not to spoil this, but keep in mind that the modulus for this problem is 10^9.
I have a very limited experience with series and I was wondering what the equation of S(N) actually means. It doesn't have the top and parts like most series I see. I haven't taken Calculus if that is a prerequisite to solving the problem.
benevolentdespot wrote: Thu May 11, 2017 3:31 am
I have a very limited experience with series and I was wondering what the equation of S(N) actually means. It doesn't have the top and parts like most series I see. I haven't taken Calculus if that is a prerequisite to solving the problem.
Are you more familiar with
$$\sum_{i=1}^N \sum_{j=1}^Nd(ij)$$
Not sure if this is what you meant by "the top". The sigmas are of course a summation. The inner summation for all integers j less than or equal to N and the outer for all integers i less than or equal to N.