MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...

By considering the terms in the Fibonacci sequence whose values do not exceed the input value, find the sum of the even-valued terms.

159 correct solutions
224 incorrect solutions

Last solution submitted on Apr 22, 2015

1 player likes this problem

1 Comment

Harish Maradana
on 13 Mar 2013

test for cheating

1 Comment

Peter Wittenberg
on 14 Apr 2012

OK, I gamed this one so it only works up to about 1 billion. I wanted to see everyone else's interesting solutions.

1 Comment

Alfonso Nieto-Castanon
on 3 Feb 2012

this trick (c.f. Solution 26456) works only for these particular test cases, it would fail for example with euler002(6)...

1 Comment