|
|
John VanSickle wrote:
> Tim Attwood wrote:
>> I'm mostly stalled at 43%, I've seen several
>> problems that are easy enough to express
>> solutions to that are none-the-less difficult
>> to compute in any reasonable amount of time.
>
> Some of the questions state an iterative problem for which there is a
> direct solution.
>
> For instance, the second problem looks iterative, but there is a direct
> formula for any member of the Fibonacci series, there is a direct
> formula for the sum of a power series, and the even-valued members of
> the Fibonacci series occur at every third position starting with 0. When
> you put that together, the sum is
>
> (1/sqrt(5) * ( (phi^(n+3)-1)/(phi-1) - ((1-phi)^(n+3)-1)/(1-phi-1) )
It turns out that this formula is wrong. The correct formula is:
1/sqrt(5) *
( (phi^(n+3)-1)/(phi^3-1) - ((1-phi)^(n+3)-1)/((1-phi)^3-1) )
Regards,
John
Post a reply to this message
|
|