Cody

# Problem 42841. Return the sequence element III

Solution 905988

Submitted on 9 Jun 2016
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
x1 = 1; x2 = 2; n = 5; y_correct = 6; assert(isequal(ulam(x1,x2,n),y_correct))

2   Pass
x1 = 1; x2 = 2; n = 22; y_correct = 77; assert(isequal(ulam(x1,x2,n),y_correct))

3   Fail
x1 = 1; x2 = 3; n = 49; y_correct = 212; assert(isequal(ulam(x1,x2,n),y_correct))

Assertion failed.

4   Fail
x1 = 1; x2 = 5; n = 10; y_correct = 22; assert(isequal(ulam(x1,x2,n),y_correct))

Assertion failed.

5   Fail
x1 = 2; x2 = 9; n = 8; y_correct = 20; assert(isequal(ulam(x1,x2,n),y_correct))

Assertion failed.

6   Fail
x1 = 2; x2 = 9; n = 26; y_correct = 77; assert(isequal(ulam(x1,x2,n),y_correct))

Assertion failed.

7   Fail
x1 = 4; x2 = 5; n = 29; y_correct = 123; assert(isequal(ulam(x1,x2,n),y_correct))

Assertion failed.

8   Fail
x1 = 6; x2 = 7; n = 29; y_correct = 123; assert(isequal(ulam(x1,x2,n),y_correct))

Assertion failed.