Cody

# Problem 45383. \$10,000 sequence

Solution 2192262

Submitted on 4 Apr 2020
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   Fail

Array indices must be positive integers or logical values. Error in Hofstadter (line 11) b(i)=b(b(i-1)) + b(i-b(i-2)-1) Error in Test1 (line 1) assert(isequal(Hofstadter(50),[29,26]))

2   Fail

Array indices must be positive integers or logical values. Error in Hofstadter (line 11) b(i)=b(b(i-1)) + b(i-b(i-2)-1) Error in Test2 (line 1) assert(isequal(Hofstadter(5),[3,2]))

3   Fail

Array indices must be positive integers or logical values. Error in Hofstadter (line 11) b(i)=b(b(i-1)) + b(i-b(i-2)-1) Error in Test3 (line 1) assert(isequal(Hofstadter(500),[255,254]))

4   Fail

Array indices must be positive integers or logical values. Error in Hofstadter (line 11) b(i)=b(b(i-1)) + b(i-b(i-2)-1) Error in Test4 (line 1) assert(isequal(Hofstadter(73),[40,34]))

5   Fail