Problem 52594. Easy Sequences 10: Sum of Cumsums of Fibonacci Sequence
The function F(n) is defined as the set of Fibonacci numbers from the first up to the n-th. S(n) is the result of applying to F, the MATLAB built-in function 'cumsum' and followed by the function 'sum'. For example for n = 10, we have:
>> Fn = [1 1 2 3 5 8 13 21 34 55];
>> Sn = sum(cumsum(Fn))
>> Sn =
364
It has been argued that the Fibonacci sequence exhibits an exponentially growth relative to the golden ratio, which means that S(n) becomes very big, very quickly. So instead, we will do the inverse operation.
Given a number 's', our task is to find the largest 'n', such that S(n) is less than or equal to 's'. In the example above we have, 'n = 10' for 's = 364' .
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers33
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
49555 Solvers
-
Remove any row in which a NaN appears
8605 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
478 Solvers
-
Set the array elements whose value is 13 to 0
1371 Solvers
-
Implement a bubble sort technique and output the number of swaps required
302 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!