Problem 232. Project Euler: Problem 2, Sum of even Fibonacci
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.
Solution Stats
Problem Comments
-
5 Comments
Show
2 older comments
Majid Farzaneh
on 15 Oct 2018
Nice problem. I always have problem with big numbers.
Mehdi BENSEDDIK
on 10 Apr 2019
I solved the problem until x = 4000000 but x = 97455000 it gives me an error of exceeding the memory(overflow) because the number is too large.
Revathe Thillaikumar
on 8 May 2022
This was fun!
Solution Comments
Show commentsGroup

Sequences & Series I
- 14 Problems
- 87 Finishers
- Sum all integers from 1 to 2^n
- Integer sequence - 2 : Kolakoski sequence
- Sum all integers from 1 to 2^n
- Project Euler: Problem 2, Sum of even Fibonacci
- Sum of first n terms of a harmonic progression
- Project Euler: Problem 6, Natural numbers, squares and sums.
- Integer Sequence - II : New Fibonacci
- Project Euler: Problem 2, Sum of even Fibonacci
- Project Euler: Problem 6, Natural numbers, squares and sums.
- Find the stride of the longest skip sequence
- Sum the Infinite Series
- Return the Fibonacci Sequence
- Sum of first n terms of a harmonic progression
- "Look and say" sequence
- Is X a Fibonacci Matrix?
- Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
- Golomb's self-describing sequence (based on Euler 341)
- Alternating sum
- Integer sequence - 2 : Kolakoski sequence
- Integer Sequence - II : New Fibonacci
Problem Recent Solvers2500
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!