Problem 704

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
miguelbento
Posts: 2
Joined: Fri Mar 08, 2019 11:16 am

Problem 704

Post by miguelbento »

Hi,

My calculations give S(100) = 480 and not 389.
I think my algorithm is ok, but obviously not... :-(

Can anyone check these results?:
S(10) = 19
S(20) = 54
S(30) = 94
S(40) = 143
S(50) = 193

Thanks,
Miguel

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

Re: Problem 704

Post by hk »

S(10)=14 and s(20)=40
below are the values for F:

Code: Select all

1 0
2 1
3 0
4 2
5 1
6 2
7 0
8 3
9 2
10 3
11 1
12 3
13 2
14 3
15 0
16 4
17 3
18 4
19 2
20 4
Image

DJohn
Posts: 56
Joined: Sat Oct 11, 2008 11:24 am

Re: Problem 704

Post by DJohn »

That value for S(10) looks familiar. You've likely misread the problem in the same way that I originally did. Check the definition of F carefully: it's the maximum value of g for a fixed n.

miguelbento
Posts: 2
Joined: Fri Mar 08, 2019 11:16 am

Re: Problem 704

Post by miguelbento »

DJohn wrote:
Wed Mar 04, 2020 10:34 am
That value for S(10) looks familiar. You've likely misread the problem in the same way that I originally did. Check the definition of F carefully: it's the maximum value of g for a fixed n.
Thanks DJohn, my mistake was exactly that. I shall proceed now :-)

Post Reply