answersLogoWhite

0

How does Fibonocci work?

User Avatar

Anonymous

14y ago
Updated: 8/18/2019

for the Fibonacci sequence, the first two terms are one (1), then the next term is found by adding the previous two terms:

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

1+1 =2 (the third term)

1+2 =3 (the fourth term)

2+3 =5 (the fifth term)

3+5 =8 (the sixth term)

etc.

for any whole number n > 2: F(n) = F(n-1) + F(n-2)

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Who discovered the fibonocci numbers?

Leonardo Fibonacci


What is the logic for Fibonacci series in delphi?

Following logic for Fibonocci int f1=0; intf2=1; int i=0; while(i


How can you write a fibonocci sequence in python?

A fibonocci sequence is a sequence where each term is equal to the sum of the previous two terms.1, 1, 2, 3, 5, 8, 13, 21, etcThere are two main ways to do this with Python. The way explained here is through a loop or iteration. The other way would be to use recursion (a function that calls itself).Note that anything following # is a comment and not part of the code.Also note that the semicolons are NOT required.top = raw_input("How high should I go?"); #prompt the user for the stopping pointnum1, num2, num3 = 0, 0, 1; #set the num1, num2, and num3 variables equal to 0, 0, and 1 respectivelytop = int(top); #top was initially a string variable, this converts it to an integer so we can compare it to our current termprint 1; #print the first 1 in the serieswhile num3 < top: #execute the indented code while num3 is less than top (our stopping point)num1 = num2; #set num1 equal to num2 (this is 2 terms ago)num2 = num3; #set num2 equal to num3 (this is the last term)num3 = num1 + num2; #calculate the new term for num3print num3; #display the new term


How did African slaves get education?

They got their education by secretly learning it if their master didn't allowed because it was illegal. Sometimes, their masters tought the slave even though it was against the law. By secretly learning it, they could learn it off another slave or steal a book and educate themselves.


If a Mexican were to come and live in the US what do they do here?

Work , Work , Work , Work , Work , Work ! They do what You lazy Americans don't . Mexicans work hard . They do it all !


What is a work calendar?

A calendar at your work, for your work, that has your work schedule on it, etc.


What is the verb in you work late?

The verb in &quot;you work late&quot; is &quot;work.&quot;


Will American cd's work in Australia?

Yes it can work Yes it can work Yes it can work Yes it can work


What is the difference between work input and work output?

Work Output is the work done BY a machine. Work Input is the work done ON a machine.


What is the differences between work input and work output?

Work Output is the work done BY a machine. Work Input is the work done ON a machine.


What did the executive work for?

they work for work law.


What did people do on weekends 1800?

Work work work and work some more.