My understanding is that a fib sequence isn't "modified" unless it is a multiple of the original in some sort (squared, cubed, times an integer etc...).
I'm curious, I'm almost 100% sure I'm right, but teacher/fellow student response is slow, so respond!
In the traditional Fibonacci problem (where a pair of rabbits is born in month 0 and produces one pair of rabbits at 2 months of life and every month thereafter forever) gives the recursive equation
numRabbits at month n: (un) = un-2+un-1
If we changed the problem to say that each rabbit pair now produces 2 pairs of rabbits instead of one the equation becomes:
numRabbits at month n: (un) = 2*un-2+un-1
right? Now, if we run out the numbers, which I wrote in Lua:
--Altered Fibonacci sequence function fibTwo(number) if number <= 1 then return 1 end return (2*(fibTwo(number-2))+fibTwo((number-1))) end --regular fib sequence function fib(number) if number <= 1 then return 1 end return ((fib(number-2))+fib((number-1))) end --modified sequence for i = 0, 10 do print(fibTwo(i)) end --original sequence for i = 0, 10 do print(fib(i)) end
We get a harmonic sequence for our modified equation but because a number divided by the number preceding it does not equal the golden ratio it isn't really a Fibonacci sequence (but a valid sequence none the less?)
If you aren't confused or hate me by this point let me ask: simply multiplying 2 by the original sequence of numbers does not give the correct sequence if the rabbits produce two other pairs of rabbits as opposed to one? I'm sure of that. Here's a visual of the modified sequence:
This post has been edited by KYA: 28 April 2009 - 07:39 PM