Cody

# Problem 1035. Generate a vector like 1,2,2,3,3,3,4,4,4,4

Solution 1098261

Submitted on 5 Jan 2017 by Matteo Raso
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
x = 2; y_correct = [1 2 2]; assert(isequal(your_fcn_name(x),y_correct))

A = 1 A = 1 1 A = 1 1 2 A = 1 1 2 2 A = 1 2 2 ans = 1 2 2

2   Pass
x = 5; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5]; assert(isequal(your_fcn_name(x),y_correct))

A = 1 A = 1 1 A = 1 1 2 A = 1 1 2 2 A = 1 1 2 2 3 A = 1 1 2 2 3 3 A = 1 1 2 2 3 3 3 A = 1 1 2 2 3 3 3 4 A = 1 1 2 2 3 3 3 4 4 A = 1 1 2 2 3 3 3 4 4 4 A = 1 1 2 2 3 3 3 4 4 4 4 A = 1 1 2 2 3 3 3 4 4 4 4 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 A = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5

3   Pass
x = 10; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 ... 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10]; assert(isequal(your_fcn_name(x),y_correct))

A = 1 A = 1 1 A = 1 1 2 A = 1 1 2 2 A = 1 1 2 2 3 A = 1 1 2 2 3 3 A = 1 1 2 2 3 3 3 A = 1 1 2 2 3 3 3 4 A = 1 1 2 2 3 3 3 4 4 A = 1 1 2 2 3 3 3 4 4 4 A = 1 1 2 2 3 3 3 4 4 4 4 A = 1 1 2 2 3 3 3 4 4 4 4 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Column 17 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 18 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 19 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 20 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 21 6 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 22 6 6 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 23 6 6 6 6 6 6 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 24 6 6 6 6 6 6 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 25 6 6 6 6 6 6 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 26 6 6 6 6 6 6 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 27 6 6 6 6 6 6 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 28 6 6 6 6 6 6 7 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 29 6 6 6 6 6 6 7 7 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 30 6 6 6 6 6 6 7 7 7 7 7 7 7 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 31 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Column 33 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 34 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 35 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 36 8 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 37 8 8 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 38 8 8 8 8 8 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 39 8 8 8 8 8 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 40 8 8 8 8 8 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 41 8 8 8 8 8 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 42 8 8 8 8 8 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 43 8 8 8 8 8 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 44 8 8 8 8 8 9 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 45 8 8 8 8 8 9 9 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 46 8 8 8 8 8 9 9 9 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 47 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 48 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 48 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 Column 49 10 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5...

4   Pass
x = 12; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 ... 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 ... 11 11 11 11 11 11 11 11 11 11 11 ... 12 12 12 12 12 12 12 12 12 12 12 12]; assert(isequal(your_fcn_name(x),y_correct))

A = 1 A = 1 1 A = 1 1 2 A = 1 1 2 2 A = 1 1 2 2 3 A = 1 1 2 2 3 3 A = 1 1 2 2 3 3 3 A = 1 1 2 2 3 3 3 4 A = 1 1 2 2 3 3 3 4 4 A = 1 1 2 2 3 3 3 4 4 4 A = 1 1 2 2 3 3 3 4 4 4 4 A = 1 1 2 2 3 3 3 4 4 4 4 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Column 17 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 18 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 19 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 20 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 21 6 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 22 6 6 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 23 6 6 6 6 6 6 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 24 6 6 6 6 6 6 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 25 6 6 6 6 6 6 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 26 6 6 6 6 6 6 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 27 6 6 6 6 6 6 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 28 6 6 6 6 6 6 7 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 29 6 6 6 6 6 6 7 7 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 30 6 6 6 6 6 6 7 7 7 7 7 7 7 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 31 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Column 33 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 34 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 35 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 36 8 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 37 8 8 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 38 8 8 8 8 8 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 39 8 8 8 8 8 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 40 8 8 8 8 8 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 41 8 8 8 8 8 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 42 8 8 8 8 8 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 43 8 8 8 8 8 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 44 8 8 8 8 8 9 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 45 8 8 8 8 8 9 9 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 46 8 8 8 8 8 9 9 9 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 47 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 48 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 48 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 Column 49 10 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5...

5   Pass
x = 9; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 ... 9 9 9 9 9 9 9 9 9]; assert(isequal(your_fcn_name(x),y_correct))

A = 1 A = 1 1 A = 1 1 2 A = 1 1 2 2 A = 1 1 2 2 3 A = 1 1 2 2 3 3 A = 1 1 2 2 3 3 3 A = 1 1 2 2 3 3 3 4 A = 1 1 2 2 3 3 3 4 4 A = 1 1 2 2 3 3 3 4 4 4 A = 1 1 2 2 3 3 3 4 4 4 4 A = 1 1 2 2 3 3 3 4 4 4 4 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Column 17 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 18 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 19 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 20 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 21 6 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 22 6 6 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 23 6 6 6 6 6 6 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 24 6 6 6 6 6 6 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 25 6 6 6 6 6 6 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 26 6 6 6 6 6 6 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 27 6 6 6 6 6 6 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 28 6 6 6 6 6 6 7 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 29 6 6 6 6 6 6 7 7 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 30 6 6 6 6 6 6 7 7 7 7 7 7 7 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 31 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Column 33 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 34 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 35 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 36 8 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 37 8 8 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 38 8 8 8 8 8 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 39 8 8 8 8 8 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 40 8 8 8 8 8 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 41 8 8 8 8 8 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 42 8 8 8 8 8 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 43 8 8 8 8 8 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 44 8 8 8 8 8 9 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 45 8 8 8 8 8 9 9 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 46 8 8 8 8 8 9 9 9 9 9 9 9 9 9 A = Columns 1 through 16 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 Columns 17 through 32 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 Columns 33 through 45 8 8 8 8 9 9 9 9 9 9 9 9 9 ans = Columns 1 through 16 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 Columns 17 through 32 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 Columns 33 through 45 8 8 8 8 9 9 9 9 9 9 9 9 9

6   Pass
x = 7; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7]; assert(isequal(your_fcn_name(x),y_correct))

A = 1 A = 1 1 A = 1 1 2 A = 1 1 2 2 A = 1 1 2 2 3 A = 1 1 2 2 3 3 A = 1 1 2 2 3 3 3 A = 1 1 2 2 3 3 3 4 A = 1 1 2 2 3 3 3 4 4 A = 1 1 2 2 3 3 3 4 4 4 A = 1 1 2 2 3 3 3 4 4 4 4 A = 1 1 2 2 3 3 3 4 4 4 4 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Column 17 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 18 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 19 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 20 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 21 6 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 22 6 6 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 23 6 6 6 6 6 6 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 24 6 6 6 6 6 6 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 25 6 6 6 6 6 6 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 26 6 6 6 6 6 6 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 27 6 6 6 6 6 6 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 28 6 6 6 6 6 6 7 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 29 6 6 6 6 6 6 7 7 7 7 7 7 7 A = Columns 1 through 16 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 Columns 17 through 28 6 6 6 6 6 7 7 7 7 7 7 7 ans = Columns 1 through 16 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 Columns 17 through 28 6 6 6 6 6 7 7 7 7 7 7 7

7   Pass
x = 15; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 ... 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 ... 11 11 11 11 11 11 11 11 11 11 11 ... 12 12 12 12 12 12 12 12 12 12 12 12 ... 13 13 13 13 13 13 13 13 13 13 13 13 13 ... 14 14 14 14 14 14 14 14 14 14 14 14 14 14 ... 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15]; assert(isequal(your_fcn_name(x),y_correct))

A = 1 A = 1 1 A = 1 1 2 A = 1 1 2 2 A = 1 1 2 2 3 A = 1 1 2 2 3 3 A = 1 1 2 2 3 3 3 A = 1 1 2 2 3 3 3 4 A = 1 1 2 2 3 3 3 4 4 A = 1 1 2 2 3 3 3 4 4 4 A = 1 1 2 2 3 3 3 4 4 4 4 A = 1 1 2 2 3 3 3 4 4 4 4 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 A = 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Column 17 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 18 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 19 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 20 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 21 6 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 22 6 6 6 6 6 6 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 23 6 6 6 6 6 6 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 24 6 6 6 6 6 6 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 25 6 6 6 6 6 6 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 26 6 6 6 6 6 6 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 27 6 6 6 6 6 6 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 28 6 6 6 6 6 6 7 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 29 6 6 6 6 6 6 7 7 7 7 7 7 7 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 30 6 6 6 6 6 6 7 7 7 7 7 7 7 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 31 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Column 33 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 34 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 35 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 36 8 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 37 8 8 8 8 8 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 38 8 8 8 8 8 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 39 8 8 8 8 8 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 40 8 8 8 8 8 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 41 8 8 8 8 8 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 42 8 8 8 8 8 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 43 8 8 8 8 8 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 44 8 8 8 8 8 9 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 45 8 8 8 8 8 9 9 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 46 8 8 8 8 8 9 9 9 9 9 9 9 9 9 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 47 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 48 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Columns 17 through 32 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 Columns 33 through 48 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 Column 49 10 A = Columns 1 through 16 1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5...