Question

The Fibonnaci sequence is a recursive sequence defined as: f0 = 1, f1 = 1, and...

The Fibonnaci sequence is a recursive sequence defined as: f0 = 1, f1 = 1, and fn = fn−1 + fn−2 for n > 1 So the first few terms are 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, . . .. Write a function/procedure/algorithm that computes the sum of all even-valued Fibonnaci terms less than or equal to some positive integer k. For example the sum of all even-valued Fibonnaci terms less than or equal to 40 is 2 + 8 + 34 = 44. Note that I am NOT asking about Fibonacci terms with even index, e.g. f2, f4, f6, etc. but rather Fibonnaci terms whose VALUE is even.

1. the pseudocode for your algorithm

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
The Fibonnaci sequence is a recursive sequence defined as: f0 = 1, f1 = 1, and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Let f0, f1, f2, . . . be the Fibonacci sequence defined as f0 = 0,...

    Let f0, f1, f2, . . . be the Fibonacci sequence defined as f0 = 0, f1 = 1, and for every k > 1, fk = fk-1 + fk-2. Use induction to prove that for every n ? 0, fn ? 2n-1 . Base case should start at f0 and f1. For the inductive case of fk+1 , you’ll need to use the inductive hypothesis for both k and k ? 1.

  • F0 = 0, F1 = 1. Thus: F2 = F1 + F0 = 1 + 0...

    F0 = 0, F1 = 1. Thus: F2 = F1 + F0 = 1 + 0 = 1, F3 = F2 + F1 = 1 + 1 = 2, F4 = F3 + F2 = 2 + 1 = 3, ... Write a program that asks how many Fibonacci numbers to compute and then show each number. for C++ beginer

  • Fibonacci num Fn are defined as follow. F0 is 1, F1 is 1, and Fi+2 =...

    Fibonacci num Fn are defined as follow. F0 is 1, F1 is 1, and Fi+2 = Fi + Fi+1, where i = 0, 1, 2, . . . . In other words, each number is the sum of the previous two numbers. Write a recursive function definition in C++ that has one parameter n of type int and that returns the n-th Fibonacci number. You can call this function inside the main function to print the Fibonacci numbers. Sample Input...

  • C++ Fibonacci Complete ComputeFibonacci() to return FN, where F0 is 0, F1 is 1, F2 is...

    C++ Fibonacci Complete ComputeFibonacci() to return FN, where F0 is 0, F1 is 1, F2 is 1, F3 is 2, F4 is 3, and continuing: FN is FN-1 + FN-2. Hint: Base cases are N == 0 and N == 1. #include <iostream> using namespace std; int ComputeFibonacci(int N) { cout << "FIXME: Complete this function." << endl; cout << "Currently just returns 0." << endl; return 0; } int main() { int N = 4; // F_N, starts at...

  • 3. The sequence (Fn) of Fibonacci numbers is defined by the recursive relation Fn+2 Fn+1+ F...

    3. The sequence (Fn) of Fibonacci numbers is defined by the recursive relation Fn+2 Fn+1+ F for all n E N and with Fi = F2= 1. to find a recursive relation for the sequence of ratios (a) Use the recursive relation for (F) Fn+ Fn an Hint: Divide by Fn+1 N (b) Show by induction that an 1 for all n (c) Given that the limit l = lim,0 an exists (so you do not need to prove that...

  • The Fibonacci Sequence F1, F2, ... of integers is defined recursively by F1=F2=1 and Fn=Fn-1+Fn-2 for each integer . Pro...

    The Fibonacci Sequence F1, F2, ... of integers is defined recursively by F1=F2=1 and Fn=Fn-1+Fn-2 for each integer . Prove that (picture) Just the top one( not 7.23) n 3 Chapter 7 Reviewing Proof Techniques 196 an-2 for every integer and an ao, a1, a2,... is a sequence of rational numbers such that ao = n > 2, then for every positive integer n, an- 3F nif n is even 2Fn+1 an = 2 Fn+ 1 if n is odd....

  • Fibonacci sequence: Cauchy-Binet formula Let (Fn)n be the Fibo- nacci sequence defined recursively by F1 =...

    Fibonacci sequence: Cauchy-Binet formula Let (Fn)n be the Fibo- nacci sequence defined recursively by F1 = F2 = 1 and Fn = Fn−1 + Fn−2In this way it all reduces to computing a high power of a 2 × 2 matrix. How can you compute an arbitrary power of a matrix and can you come up with the Cauchy-Binet formula from here?

  • Using R code only 4. The Fibonacci numbers are the sequence of numbers defined by the...

    Using R code only 4. The Fibonacci numbers are the sequence of numbers defined by the linear recurrence equation Fn F-1 F-2 where F F2 1 and by convention Fo 0. For example, the first 8 Fibonacci numbers are 1, 1, 2, 3, 5, 8, 13, 21. (a) For a given n, compute the nth Fibonnaci number using a for loop (b) For a given n, compute the nth Fibonnaci number using a while loop Print the 15th Fibonacci number...

  • Problem 7.8 (Explore: Fibonacci Identities). The Fibonacci numbers are a famous integer sequence:...

    discrete math Problem 7.8 (Explore: Fibonacci Identities). The Fibonacci numbers are a famous integer sequence: Fn) o 0, 1, 1,2,3, 5, 8, 13, 21, 34, 55, 89,... defined recursively by Fo 0, F1, and F F Fn-2 for n2 2. (a) Find the partial sums Fo+Fi +F2, Fo+ Fi +F2Fs, Fo + Fi + F2+Fs +F, FoF1+F2+ Fs+F4F (b) Compare your partial sums above with the terms of the Fibonacci sequence. Do you see any patterns? Make a conjecture for...

  • Exercise 6. Let En be the sequence of Fibonacci numbers: Fo = 0, F1 = 1,...

    Exercise 6. Let En be the sequence of Fibonacci numbers: Fo = 0, F1 = 1, and Fn+2 = Fn+1 + Fn for all natural numbers n. For example, F2 = Fi + Fo=1+0=1 and F3 = F2 + F1 = 1+1 = 2. Prove that Fn = Fla" – BM) for all natural numbers n, where 1 + a=1+ V5 B-1-15 =- 2 Hint: Use strong induction. Notice that a +1 = a and +1 = B2!

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT