Mathematics OpenStudy (anonymous):

1,3,4,7,11,... what is the next sequence number? OpenStudy (shadowfiend):

Can you find a relationship between 4 and its previous two numbers? What about 7 and its previous two numbers? OpenStudy (michael):

is 18 OpenStudy (anonymous):

ok.i get it.but how to make the formula? OpenStudy (michael):

a_n=a_{n-1}+a_{n-2} OpenStudy (michael): OpenStudy (anonymous):

michael are you study computer science? OpenStudy (shadowfiend):

Note that the relation is the same as that of the Fibonacci numbers, but these are not the fibonacci numbers, because the sequence starts at 1 and 3, not at 0-1-1 (or 1-1). OpenStudy (anonymous):

so what we call that number? OpenStudy (shadowfiend):

There's no special name for these numbers, they just happen to be related in that term number \(n\) of the relation is defined as the sum of the previous two terms. OpenStudy (anonymous):

sorry,can i ask you about recursive function? i really don`t understand.. hope you can help me.. OpenStudy (shadowfiend):

Sure, what do you need? OpenStudy (anonymous):

what is recursive function? what i know just it will recall itself. is it? OpenStudy (shadowfiend):

From a computer science perspective, yes, that's correct. A recursive function is a function that calls itself. Generally speaking, recursive functions have a `base case' which, when true, makes the function not call itself. That is how they avoid calling themselves infinitely. For example, in the case of the fibonacci numbers, the base case is having 0 and 1 -- the result is then 1, without having to look at anything else. OpenStudy (anonymous):

example else of 'base case'? the easier one. actaualy i do not understand the base case. OpenStudy (shadowfiend):

Well, briefly, if we were to write a function for fibonacci (a bad example, honestly, because writing it recursively is a bit slow, bit it will do) that returns the n-th fibonacci number, we would do: function fibonacci(n): if n == 1 or n == 0 then return 1 else return fibonacci(n - 2) + fibonacci(n - 1) We should also technically take care of n being less than zero, in which case we can answer `undefined' or some such, but that's beside the point. The point here is, if I ask for the 1st fibonacci number, I will get 1. If I ask for the second fibonacci number, I will get the 0th fibonacci number + the 1st fibonacci number, both of which are defined as one, so I will get 2. If I ask for the third, I will get the 1st fibonacci number + the 2nd fibonacci number, which we defined above as the 0th fibonacci number + the 1st fibonacci number, so we will get 3 (1 + 2). And so on and so forth. OpenStudy (anonymous):

oh. i get it. thank you so much. hope it will help me on final. OpenStudy (shadowfiend): OpenStudy (anonymous):

but later can i ask you more about something like this? my course related to this topic. OpenStudy (shadowfiend):

Sure, though you might find some more/better help in the MIT 6.0 Intro Computer Science group at http://new.openstudy.com/ OpenStudy (anonymous):

18

Latest Questions jonahcam1347: if u have a right triangle and the legs of the triangle r 5in, 7in, what is the l
2 minutes ago 0 Replies 0 Medals jonahcam1347: nun
7 minutes ago 9 Replies 0 Medals jonahcam1347: noahcam1349 answer this y u so fat
10 minutes ago 16 Replies 0 Medals Sock: 2.34 + -2/7 + (-0.45) + 3/8 / 4
14 minutes ago 6 Replies 1 Medal dukedadon: The line segment is reflected about the x-axis to form Eu2032Fu2032. Which statem
17 minutes ago 12 Replies 0 Medals jbbenedict: A young sumo wrestler decided to go on a special high-protein diet to gain weight rapidly.
6 minutes ago 7 Replies 1 Medal dukedadon: Angle Q measures 30 degrees. If angle Q is rotated 15 degrees, what is the measur
24 minutes ago 2 Replies 2 Medals Sock: Why is it important for diploid cells to form haploid cells (half the number) in
27 minutes ago 0 Replies 0 Medals KamieQueen: What exactly is gravity?
41 minutes ago 12 Replies 2 Medals dukedadon: how to deal with a room full of annoying females?
31 minutes ago 24 Replies 4 Medals