Using Wladimir's formulas, you have:

F(0) + F(1) + F(2) + F(3) + F(4) + F(5) + F(6) + ... + F(3n-2) + F(3n-1) +
F(3n) = F(3n+2) - 1
F(0) +(F(1) + F(2))+ F(3) +(F(4) + F(5))+ F(6) + ... +(F(3n-2) + F(3n-1))+
F(3n) = F(3n+2) - 1
F(0) + 2F(3) + 2F(6) + ... + 2F(3n) = F(3n+2) - 1

Since F(0) = 0,
F(0) + F(3) + F(6) + ... + F(3n) = (F(3n+2) - 1)/2


Marcelo Menegali

On Sun, Oct 2, 2011 at 2:10 AM, shady <[email protected]> wrote:

> this is bruteforce. You are calculating all fib. numbers.
>
>
> On Sun, Oct 2, 2011 at 10:38 AM, rahul sharma <[email protected]>wrote:
>
>> yea...first sol is brute force...but this is not..that is posted by
>> akansha....i think...but not sure...the question wants only
>> recursive....hoope sumone may come with sumthng new
>>
>>
>> On Sun, Oct 2, 2011 at 10:35 AM, Siddhartha Banerjee <
>> [email protected]> wrote:
>>
>>> there must be a non brute force approach too rite???
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to