Problem 60613. Complete a 2nd order difference sequence
In Cody Problem 59791 ChrisR asks us to find the integer that completes a randomly sorted geometric sequence with one missing element. This problem is similar, but it deals with 2nd order difference sequences which is sorted.
For example, in the list [1 4 9 16 25], the first difference is [1 3 5 7 9] and the second [2 2 2 2].
So when x=[1 4 9 25] is provided, return 16.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers5
Suggested Problems
-
Increment a number, given its digits
680 Solvers
-
Project Euler: Problem 7, Nth prime
1745 Solvers
-
102 Solvers
-
Get the elements of diagonal and antidiagonal for any m-by-n matrix
509 Solvers
-
Join Strings with Multiple Different Delimiters
222 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!