Cody

# Problem 44340. Recaman Sequence - III

Solution 1306479

Submitted on 21 Oct 2017
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
x = 1; y_correct = 1; assert(isequal(RecamanIII(x),y_correct)) assert(~any(cellfun(@(x)ismember(max([0,str2num(x)]),[13 15 26 54 208 2485]),regexp(fileread('RecamanIII.m'),'[\d\.\+\-\*\/]+','match'))))

y = 1

Assertion failed.

2   Fail
x = 2; y_correct = 0; assert(isequal(RecamanIII(x),y_correct)) assert(~any(cellfun(@(x)ismember(max([0,str2num(x)]),[13 15 26 54 208 2485]),regexp(fileread('RecamanIII.m'),'[\d\.\+\-\*\/]+','match'))))

Assertion failed.

3   Fail
x = 3; y_correct = 4; assert(isequal(RecamanIII(x),y_correct)) assert(~any(cellfun(@(x)ismember(max([0,str2num(x)]),[13 15 26 54 208 2485]),regexp(fileread('RecamanIII.m'),'[\d\.\+\-\*\/]+','match'))))

Assertion failed.

4   Fail
x = 9; y_correct = 13; assert(isequal(RecamanIII(x),y_correct)) assert(~any(cellfun(@(x)ismember(max([0,str2num(x)]),[13 15 26 54 208 2485]),regexp(fileread('RecamanIII.m'),'[\d\.\+\-\*\/]+','match'))))

Assertion failed.

5   Fail
x = 13; y_correct = 15; assert(isequal(RecamanIII(x),y_correct)) assert(~any(cellfun(@(x)ismember(max([0,str2num(x)]),[13 15 26 54 208 2485]),regexp(fileread('RecamanIII.m'),'[\d\.\+\-\*\/]+','match'))))

Assertion failed.

6   Fail
x = 15; y_correct = 26; assert(isequal(RecamanIII(x),y_correct)) assert(~any(cellfun(@(x)ismember(max([0,str2num(x)]),[13 15 26 54 208 2485]),regexp(fileread('RecamanIII.m'),'[\d\.\+\-\*\/]+','match'))))

Assertion failed.

7   Fail
x = 26; y_correct = 54; assert(isequal(RecamanIII(x),y_correct)) assert(~any(cellfun(@(x)ismember(max([0,str2num(x)]),[13 15 26 54 208 2485]),regexp(fileread('RecamanIII.m'),'[\d\.\+\-\*\/]+','match'))))

Assertion failed.

8   Fail
x = 54; y_correct = 208; assert(isequal(RecamanIII(x),y_correct)) assert(~any(cellfun(@(x)ismember(max([0,str2num(x)]),[13 15 26 54 208 2485]),regexp(fileread('RecamanIII.m'),'[\d\.\+\-\*\/]+','match'))))

Assertion failed.

9   Fail
x = 208; y_correct = 2485; assert(isequal(RecamanIII(x),y_correct)) assert(~any(cellfun(@(x)ismember(max([0,str2num(x)]),[13 15 26 54 208 2485]),regexp(fileread('RecamanIII.m'),'[\d\.\+\-\*\/]+','match'))))

Assertion failed.