Cody

Problem 45383. $10,000 sequence

Solution 3343618

Submitted on 23 Oct 2020 by Dyuman Joshi
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(Hofstadter(50),[29,26]))

2   Pass
assert(isequal(Hofstadter(5),[3,2]))

3   Pass
assert(isequal(Hofstadter(500),[255,254]))

4   Pass
assert(isequal(Hofstadter(73),[40,34]))

5   Pass
assert(isequal(Hofstadter(1489),[819 695]))

Suggested Problems

More from this Author149

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!