Cody

Problem 45383. $10,000 sequence

Solution 2190968

Submitted on 3 Apr 2020 by Martin C.
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]))

y = 29 26

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

y = 3 2

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

y = 255 254

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

y = 40 34

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

y = 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!