Problem 002
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.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
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
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.
Re: Problem 002
@phillyj : Please don't start a new thread (topic) if one already exists for the same problem.

 Posts: 1
 Joined: Wed Oct 20, 2010 10:49 am
Re: Problem 002
hi guys,
sorry i still not understand about this sentence, maybe can translate to me to Indonesian?
in this case, "Find the sum of all the evenvalued terms in the sequence which do not exceed four million"
i am not understand about this sentence.. somebody can translate for me...i put my answer and the result is wrong, maybe i not yet understand about the question. so what the mean about the question. for example if 4 million change to 10. what the result? is it to be 1,2,3,5,8 right? and the answer is 8? or 1+2+3+4+5+8 = 23? any body help me? thanks before
sorry i still not understand about this sentence, maybe can translate to me to Indonesian?
in this case, "Find the sum of all the evenvalued terms in the sequence which do not exceed four million"
i am not understand about this sentence.. somebody can translate for me...i put my answer and the result is wrong, maybe i not yet understand about the question. so what the mean about the question. for example if 4 million change to 10. what the result? is it to be 1,2,3,5,8 right? and the answer is 8? or 1+2+3+4+5+8 = 23? any body help me? thanks before
Re: Problem 002
if you change 4 million to 10 the answer would be 2+8=10.
Why? 2 and 8 are the fibonnacci numbers less than 10 that are even. (an even number is a number that is divisible by 2).
Why? 2 and 8 are the fibonnacci numbers less than 10 that are even. (an even number is a number that is divisible by 2).
Re: Problem 002
Hi,
I spent a while getting this wrong because I misunderstood the problem statement:
It might be a little clearer if the problem was phrased as:
Find the sum of all the evenvalued terms under four million in the Fibonacci sequence.
I spent a while getting this wrong because I misunderstood the problem statement:
I incorrectly thought the not exceeding 4 million referred to the sum rather than the evenvalued terms.Find the sum of all the evenvalued terms in the Fibonacci sequence which do not exceed four million.
It might be a little clearer if the problem was phrased as:
Find the sum of all the evenvalued terms under four million in the Fibonacci sequence.
 euler
 Administrator
 Posts: 3069
 Joined: Sun Mar 05, 2006 4:49 pm
 Location: Cheshire, England
 Contact:
Re: Problem 002
This has been addressed before. Contrast the following two sentences.
Find the sum of all the evenvalued terms in the Fibonacci sequence which do not exceed four million.
Find the sum of all the evenvalued terms in the Fibonacci sequence which does not exceed four million.
The antecedent to "which" is identified by the use of the verb: "which do" refers to the terms (plural); "which does" refers to the sum (singular).
However, given the regularity to which this is creating confusion  and it's not like we're trying to test subtle use of grammar  so I'll change it to the following...
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the evenvalued terms.
Find the sum of all the evenvalued terms in the Fibonacci sequence which do not exceed four million.
Find the sum of all the evenvalued terms in the Fibonacci sequence which does not exceed four million.
The antecedent to "which" is identified by the use of the verb: "which do" refers to the terms (plural); "which does" refers to the sum (singular).
However, given the regularity to which this is creating confusion  and it's not like we're trying to test subtle use of grammar  so I'll change it to the following...
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the evenvalued terms.
impudens simia et macrologus profundus fabulae
Re: Problem 002
edit: figured it out.
Last edited by sunde887 on Wed Jan 05, 2011 9:48 pm, edited 1 time in total.
 rayfil
 Administrator
 Posts: 1401
 Joined: Sun Mar 26, 2006 4:30 am
 Location: Ontario, Canada
 Contact:
Re: Problem 002
Regardless if posted results are correct or not, the opening message is clear, i.e. don't post any code or results.(I hope this isn't a spoiler, I apologize if it is)
When you assume something, you risk being wrong half the time.
Re: Problem 002
The Java solution:
code snipped by hk
}
code snipped by hk
}
Re: Problem 002
This forum is not meant to post solutions. Please remove it.

 Posts: 2
 Joined: Thu May 19, 2011 8:27 pm
Re: Problem 002
Hi,
I am new to this site, and I have just done problem 002.
I have done it 2 ways...
1) the hard way (pure math + simple calculator), and I have found an algebraic formula for the answer
2) and then using a small algorithm with few lines of code... mainly for checking.
After I have submitted my result, I have read many comments on the solution (the official pdf, then posts among the 250 ones), but I was disapointed by the official solution shown, and the solution forum is closed ...
Is there an administrator to reopen it, or someone wanting my closedformula solution by email ?
I understand that its written not to deliver the solution in public forums, so I don't write it here...
Sincerely,
I am new to this site, and I have just done problem 002.
I have done it 2 ways...
1) the hard way (pure math + simple calculator), and I have found an algebraic formula for the answer
2) and then using a small algorithm with few lines of code... mainly for checking.
After I have submitted my result, I have read many comments on the solution (the official pdf, then posts among the 250 ones), but I was disapointed by the official solution shown, and the solution forum is closed ...
Is there an administrator to reopen it, or someone wanting my closedformula solution by email ?
I understand that its written not to deliver the solution in public forums, so I don't write it here...
Sincerely,
Re: Problem 002
You can PM your solution to me as I wrote the pdf.

 Posts: 2
 Joined: Thu May 19, 2011 8:27 pm
Re: Problem 002
did you received the email ?
Re: Problem 002
I did. I will investigate it and send you a reply.
Re: Problem 002
I am having a little trouble with this one. I think I may be interpreting the question incorrectly. The value in question is the actual terms of the sequence, not the corresponding position in the sequence correct? If that is the case then I am not sure why my code is not working. Would I be able to pm it to someone to give it a quick glance?
Problem 002
Hi Euler Team,
Regarding problem two, the Fibonacci sequence starts like this:
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
0 1 1 2 3 5 8 13 21 34 55..., *
but the problem outline starts with the terms 1 and 2 (F2 and F3). This would change the solution.
Where should I start? Semantics, I know, but problem 1 caught me out with semantics ("...3 OR 5...").
Thanks in advance for a clarification,
Steve.
* (Thank you Wikipedia: http://en.wikipedia.org/wiki/Fibonacci_ ... ci_numbers )
Regarding problem two, the Fibonacci sequence starts like this:
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
0 1 1 2 3 5 8 13 21 34 55..., *
but the problem outline starts with the terms 1 and 2 (F2 and F3). This would change the solution.
Where should I start? Semantics, I know, but problem 1 caught me out with semantics ("...3 OR 5...").
Thanks in advance for a clarification,
Steve.
* (Thank you Wikipedia: http://en.wikipedia.org/wiki/Fibonacci_ ... ci_numbers )
Re: Problem 002
The answer is NOT affected as you are asked for the sum of the evenvalued terms.

 Posts: 1
 Joined: Tue Jul 16, 2013 5:53 am
Problem 2: Even Fibonacci numbers
There is an error on the problem description.
The Fibonacci sequence does not go: 1,2,3,5,...
It goes: 0,1,1,2,3,5,...
Or maybe even: 1,1,2,3,5,...
http://en.wikipedia.org/wiki/Fibonacci_number
http://en.wikipedia.org/wiki/File:FibonacciBlocks.svg
The Fibonacci sequence does not go: 1,2,3,5,...
It goes: 0,1,1,2,3,5,...
Or maybe even: 1,1,2,3,5,...
http://en.wikipedia.org/wiki/Fibonacci_number
http://en.wikipedia.org/wiki/File:FibonacciBlocks.svg
Re: Problem 2: Even Fibonacci numbers
Or even:
1,0,1,1,2,3
Or
1,1,0,1,1,2,3
Or
2,1,0,1,1,2,3
So I'm not sure what you try to tell us.
1,0,1,1,2,3
Or
1,1,0,1,1,2,3
Or
2,1,0,1,1,2,3
So I'm not sure what you try to tell us.