public static int Solution() { return(FibonacciSequence.SequenceBy(4000000).Where(x => x % 2 == 0).Sum()); }
//----------------------------------------------------------------- //By considering the terms in the Fibonacci sequence whose values //do not exceed four million, find the sum of the even-valued terms. //Answer: 4613732 //----------------------------------------------------------------- public override long Solve() { var sequence = FibonacciSequence.GenerateSequenceBelow(4000000); return(CalculateEvenTermsSum(sequence)); }