Cody

Solution 1909990

Submitted on 23 Aug 2019 by Eugene Avrutin
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
Init = [1,1]; Rules = [1,1]; N = 1:10; values_correct = [1 1 2 3 5 8 13 21 34 55]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 1 1 0 0 0 0 0 0 0 0 current = 1 1 1 0 0 0 0 0 0 0 current = 1 1 2 0 0 0 0 0 0 0 current = 1 1 2 2 0 0 0 0 0 0 current = 1 1 2 3 0 0 0 0 0 0 current = 1 1 2 3 3 0 0 0 0 0 current = 1 1 2 3 5 0 0 0 0 0 current = 1 1 2 3 5 5 0 0 0 0 current = 1 1 2 3 5 8 0 0 0 0 current = 1 1 2 3 5 8 8 0 0 0 current = 1 1 2 3 5 8 13 0 0 0 current = 1 1 2 3 5 8 13 13 0 0 current = 1 1 2 3 5 8 13 21 0 0 current = 1 1 2 3 5 8 13 21 21 0 current = 1 1 2 3 5 8 13 21 34 0 current = 1 1 2 3 5 8 13 21 34 34 current = 1 1 2 3 5 8 13 21 34 55 values = 1 1 2 3 5 8 13 21 34 55 values = 1 1 2 3 5 8 13 21 34 55

2   Pass
Init = [2,3]; Rules = [1,1]; N = 1:10; values_correct = [2, 3, 5, 8, 13, 21, 34, 55, 89, 144]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 2 3 0 0 0 0 0 0 0 0 current = 2 3 3 0 0 0 0 0 0 0 current = 2 3 5 0 0 0 0 0 0 0 current = 2 3 5 5 0 0 0 0 0 0 current = 2 3 5 8 0 0 0 0 0 0 current = 2 3 5 8 8 0 0 0 0 0 current = 2 3 5 8 13 0 0 0 0 0 current = 2 3 5 8 13 13 0 0 0 0 current = 2 3 5 8 13 21 0 0 0 0 current = 2 3 5 8 13 21 21 0 0 0 current = 2 3 5 8 13 21 34 0 0 0 current = 2 3 5 8 13 21 34 34 0 0 current = 2 3 5 8 13 21 34 55 0 0 current = 2 3 5 8 13 21 34 55 55 0 current = 2 3 5 8 13 21 34 55 89 0 current = 2 3 5 8 13 21 34 55 89 89 current = 2 3 5 8 13 21 34 55 89 144 values = 2 3 5 8 13 21 34 55 89 144 values = 2 3 5 8 13 21 34 55 89 144

3   Pass
Init = [1,1]; Rules = [1,1]; N = -5:5; values_correct = [5, -3, 2, -1, 1, 0, 1, 1, 2, 3, 5]; values_accepted = [nan, nan, nan, nan, nan, nan, 1, 1, 2, 3, 5]; values = recurrence_seq(N, Init, Rules); assert(isequal(values,values_correct)||isequaln(values,values_accepted))

N = 2 3 4 5 6 7 8 9 10 11 12 current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 0 0 0 0 0 0 0 0 0 current = 1 1 2 0 0 0 0 0 0 0 0 0 current = 1 1 2 2 0 0 0 0 0 0 0 0 current = 1 1 2 3 0 0 0 0 0 0 0 0 current = 1 1 2 3 3 0 0 0 0 0 0 0 current = 1 1 2 3 5 0 0 0 0 0 0 0 current = 1 1 2 3 5 5 0 0 0 0 0 0 current = 1 1 2 3 5 8 0 0 0 0 0 0 current = 1 1 2 3 5 8 8 0 0 0 0 0 current = 1 1 2 3 5 8 13 0 0 0 0 0 current = 1 1 2 3 5 8 13 13 0 0 0 0 current = 1 1 2 3 5 8 13 21 0 0 0 0 current = 1 1 2 3 5 8 13 21 21 0 0 0 current = 1 1 2 3 5 8 13 21 34 0 0 0 current = 1 1 2 3 5 8 13 21 34 34 0 0 current = 1 1 2 3 5 8 13 21 34 55 0 0 current = 1 1 2 3 5 8 13 21 34 55 55 0 current = 1 1 2 3 5 8 13 21 34 55 89 0 current = 1 1 2 3 5 8 13 21 34 55 89 89 current = 1 1 2 3 5 8 13 21 34 55 89 144 values = 1 2 3 5 8 13 21 34 55 89 144 values = 1 2 3 5 8 13 21 34 55 89 144 values = NaN NaN NaN NaN NaN NaN 1 1 2 3 5

4   Pass
Init = [1,3]; Rules = [1,1]; N = 1:10; values_correct = [1, 3, 4, 7, 11, 18, 29, 47, 76, 123]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 1 3 0 0 0 0 0 0 0 0 current = 1 3 3 0 0 0 0 0 0 0 current = 1 3 4 0 0 0 0 0 0 0 current = 1 3 4 4 0 0 0 0 0 0 current = 1 3 4 7 0 0 0 0 0 0 current = 1 3 4 7 7 0 0 0 0 0 current = 1 3 4 7 11 0 0 0 0 0 current = 1 3 4 7 11 11 0 0 0 0 current = 1 3 4 7 11 18 0 0 0 0 current = 1 3 4 7 11 18 18 0 0 0 current = 1 3 4 7 11 18 29 0 0 0 current = 1 3 4 7 11 18 29 29 0 0 current = 1 3 4 7 11 18 29 47 0 0 current = 1 3 4 7 11 18 29 47 47 0 current = 1 3 4 7 11 18 29 47 76 0 current = 1 3 4 7 11 18 29 47 76 76 current = 1 3 4 7 11 18 29 47 76 123 values = 1 3 4 7 11 18 29 47 76 123 values = 1 3 4 7 11 18 29 47 76 123

5   Pass
Init = [1, 1, 1]; Rules = [1, 1, 0]; N = 4:21; values_correct = [2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, 37, 49, 65, 86, 114, 151, 200]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 4 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 5 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 0 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 7 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 0 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 9 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 0 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 12 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 0 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 16 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 0 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 21 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 0 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 28 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 0 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 37 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 0 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 49 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 0 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 65 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 114 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 114 0 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 114 86 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 114 151 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 114 151 0 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 114 151 114 current = 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 114 151 200 values = 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 114 151 200 values = 2 2 3 4 5 7 9 12 16 21 28 37 49 65 86 114 151 200

6   Pass
Init = [0, 1]; Rules = [1, 2]; N = 4:3:19; values_correct = [5, 70, 985, 13860, 195025, 2744210]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 12 24 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 12 29 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 12 29 58 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 12 29 70 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 12 29 70 140 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 12 29 70 169 0 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 12 29 70 169 338 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 12 29 70 169 408 0 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 12 29 70 169 408 816 0 0 0 0 0 0 0 0 0 current = 0 1 2 5 12 29 70 169 408 985 0 0 0 0 0 0 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 1970 0 0 0 0 Columns 16 through 19 0 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 0 0 0 0 Columns 16 through 19 0 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 4756 0 0 0 Columns 16 through 19 0 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 0 0 0 Columns 16 through 19 0 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 11482 0 0 Columns 16 through 19 0 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 0 0 Columns 16 through 19 0 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 27720 0 Columns 16 through 19 0 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 33461 0 Columns 16 through 19 0 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 33461 66922 Columns 16 through 19 0 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 33461 80782 Columns 16 through 19 0 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 33461 80782 Columns 16 through 19 161564 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 33461 80782 Columns 16 through 19 195025 0 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 33461 80782 Columns 16 through 19 195025 390050 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 33461 80782 Columns 16 through 19 195025 470832 0 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 33461 80782 Columns 16 through 19 195025 470832 941664 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 33461 80782 Columns 16 through 19 195025 470832 1136689 0 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 33461 80782 Columns 16 through 19 195025 470832 1136689 2273378 current = Columns 1 through 15 0 1 2 5 12 29 70 169 408 985 2378 5741 13860 33461 80782 Columns 16 through 19 195025 470832 1136689 2744210 values = Columns 1 through 15 5 0 0 70 0 0 985 0 0 13860 0 0 195025 0 0 Column 16 2744210 values = Columns 1 through 15 5 NaN 0 70 0 0 985 0 0 13860 0 0 195025 0 0 Column 16 2744210 values = Columns 1 through 15 5 NaN NaN 70 0 0 985 0 0 13860 0 0 195025 0 0 Column 16 2744210 values = Columns 1 through 15 5 NaN NaN 70 NaN 0 985 0 0 13860 0 0 195025 0 0 Column 16 2744210 values = Columns 1 through 15 5 NaN NaN 70 NaN NaN 985 0 0 13860 0 ...

7   Pass
Init = [3-2, 9-4]; Rules = [-6 5]; N = 1:10; values_correct = [1, 5, 19, 65, 211, 665, 2059, 6305, 19171, 58025]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 1 5 0 0 0 0 0 0 0 0 current = 1 5 25 0 0 0 0 0 0 0 current = 1 5 19 0 0 0 0 0 0 0 current = 1 5 19 95 0 0 0 0 0 0 current = 1 5 19 65 0 0 0 0 0 0 current = 1 5 19 65 325 0 0 0 0 0 current = 1 5 19 65 211 0 0 0 0 0 current = 1 5 19 65 211 1055 0 0 0 0 current = 1 5 19 65 211 665 0 0 0 0 current = 1 5 19 65 211 665 3325 0 0 0 current = 1 5 19 65 211 665 2059 0 0 0 current = 1 5 19 65 211 665 2059 10295 0 0 current = 1 5 19 65 211 665 2059 6305 0 0 current = 1 5 19 65 211 665 2059 6305 31525 0 current = 1 5 19 65 211 665 2059 6305 19171 0 current = 1 5 19 65 211 665 2059 6305 19171 95855 current = 1 5 19 65 211 665 2059 6305 19171 58025 values = 1 5 19 65 211 665 2059 6305 19171 58025 values = 1 5 19 65 211 665 2059 6305 19171 58025

8   Pass
Init = [3, 0, 2]; Rules = [1, 1, 0]; N = [28:38, 10:-1:1]; values_correct = [1983, 2627, 3480, 4610, 6107, 8090, 10717, 14197, 18807, 24914, 33004, 12, 10, 7, 5, 5, 2, 3, 2, 0, 3]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = Columns 1 through 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Column 31 0 current = Columns 1 through 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 32 0 0 current = Columns 1 through 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 33 0 0 0 current = Columns 1 through 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 34 0 0 0 0 current = Columns 1 through 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 35 0 0 0 0 0 current = Columns 1 through 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 36 0 0 0 0 0 0 current = Columns 1 through 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 37 0 0 0 0 0 0 0 current = Columns 1 through 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 2 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 2 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 2 5 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 2 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 2 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 2 5 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 38 0 0 0 0 0 0 0 0 current = Columns 1 through 30 3 0 2 3 2 5 5 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 t...

9   Pass
Init = [3, 0, 2]; % Perrin init Rules = [1, 1, 1]; % Tribonacci rules N = [1:15]; values_correct = [3, 0, 2, 5, 7, 14, 26, 47, 87, 160, 294, 541, 995, 1830, 3366]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 3 0 2 0 0 0 0 0 0 0 0 0 0 0 0 current = 3 0 2 2 0 0 0 0 0 0 0 0 0 0 0 current = 3 0 2 2 0 0 0 0 0 0 0 0 0 0 0 current = 3 0 2 5 0 0 0 0 0 0 0 0 0 0 0 current = 3 0 2 5 5 0 0 0 0 0 0 0 0 0 0 current = 3 0 2 5 7 0 0 0 0 0 0 0 0 0 0 current = 3 0 2 5 7 0 0 0 0 0 0 0 0 0 0 current = 3 0 2 5 7 7 0 0 0 0 0 0 0 0 0 current = 3 0 2 5 7 12 0 0 0 0 0 0 0 0 0 current = 3 0 2 5 7 14 0 0 0 0 0 0 0 0 0 current = 3 0 2 5 7 14 14 0 0 0 0 0 0 0 0 current = 3 0 2 5 7 14 21 0 0 0 0 0 0 0 0 current = 3 0 2 5 7 14 26 0 0 0 0 0 0 0 0 current = 3 0 2 5 7 14 26 26 0 0 0 0 0 0 0 current = 3 0 2 5 7 14 26 40 0 0 0 0 0 0 0 current = 3 0 2 5 7 14 26 47 0 0 0 0 0 0 0 current = 3 0 2 5 7 14 26 47 47 0 0 0 0 0 0 current = 3 0 2 5 7 14 26 47 73 0 0 0 0 0 0 current = 3 0 2 5 7 14 26 47 87 0 0 0 0 0 0 current = 3 0 2 5 7 14 26 47 87 87 0 0 0 0 0 current = 3 0 2 5 7 14 26 47 87 134 0 0 0 0 0 current = 3 0 2 5 7 14 26 47 87 160 0 0 0 0 0 current = 3 0 2 5 7 14 26 47 87 160 160 0 0 0 0 current = 3 0 2 5 7 14 26 47 87 160 247 0 0 0 0 current = 3 0 2 5 7 14 26 47 87 160 294 0 0 0 0 current = 3 0 2 5 7 14 26 47 87 160 294 294 0 0 0 current = 3 0 2 5 7 14 26 47 87 160 294 454 0 0 0 current = 3 0 2 5 7 14 26 47 87 160 294 541 0 0 0 current = 3 0 2 5 7 14 26 47 87 160 294 541 541 0 0 current = 3 0 2 5 7 14 26 47 87 160 294 541 835 0 0 current = 3 0 2 5 7 14 26 47 87 160 294 541 995 0 0 current = 3 0 2 5 7 14 26 47 87 160 294 541 995 995 0 current = 3 0 2 5 7 14 26 47 87 160 294 541 995 1536 0 current = 3 0 2 5 7 14 26 47 87 160 294 541 995 1830 0 current = 3 0 2 5 7 14 26 47 87 160 294 541 995 1830 1830 current = 3 0 2 5 7 14 26 47 87 160 294 541 995 1830 2825 current = 3 0 2 5 7 14 26 47 87 160 294 541 995 1830 3366 values = 3 0 2 5 7 14 26 47 87 160 294 541 995 1830 3366 values = 3 0 2 5 7 14 26 47 87 160 294 541 995 1830 3366

10   Pass
Init = [0, 0, 1]; Rules = [1, 1, 1]; N = [1:23]; values_correct = [0, 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 504, 927, 1705, 3136, 5768, 10609, 19513, 35890, 66012, 121415]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 24 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 37 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 44 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 68 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 81 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 125 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 149 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 149 149 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 149 230 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 149 274 0 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 149 274 274 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 149 274 423 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 149 274 504 0 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 149 274 504 504 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 149 274 504 778 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 0 0 0 0 0 0 0 0 current = 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 927 0 0 0 0 0 0 0 current = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Columns 16 through 23 1431 0 0 0 0 0 0 0 current = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Columns 16 through 23 1705 0 0 0 0 0 0 0 current = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Columns 16 through 23 1705 1705 0 0 0 0 0 0 current = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Columns 16 through 23 1705 2632 0 0 0 0 0 0 current = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Columns 16 through 23 1705 3136 0 0 0 0 0 0 current = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Columns 16 through 23 1705 3136 3136 0 0 0 0 0 current = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 ...

11   Pass
Init = [0, 0, 0, 1]; Rules = [1, 1, 1, 1]; N = [20:23]; values_correct = [20569, 39648, 76424, 147312]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 15 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 23 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 27 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 29 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 44 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 52 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 56 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 85 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 100 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 108 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 164 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 193 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 208 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 208 208 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 208 316 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 208 372 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 208 401 0 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 208 401 401 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 208 401 609 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 208 401 717 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 0 0 0 0 0 0 0 0 current = 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 773 0 0 0 0 0 0 0 current = Columns 1 through 15 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 Columns 16 through 23 1174 0 0 0 0 0 0 0 current = Columns 1 through 15 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 Columns 16 through 23 1382 0 0 0 0 0 0 0 current = Columns 1 through 15 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 Columns 16 through 23 1490 0 0 0 0 0 0 0 current...

12   Pass
Init = [0, 0, 0, 0, 0, 0, 1]; Rules = [1, 1, 1, 1, 1, 1, 1]; N = [7:15, 19]; values_correct = [1, 1, 2, 4, 8, 16, 32, 64, 127, 2000]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 2 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 3 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 4 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 6 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 7 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 8 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 12 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 14 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 15 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 16 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 24 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 28 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 30 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 31 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 0 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 32 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 48 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 56 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 60 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 62 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 63 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 0 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 64 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 96 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 112 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 120 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 124 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 126 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 0 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 127 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 191 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 223 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 239 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 247 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 251 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 253 0 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 253 253 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 253 380 0 0 current = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 253 444 0 0 current = 0 ...

13   Pass
Init = [1, -1]; Rules = [1, -1]; N = 1:10; values_correct = [1, -1, 2, -3, 5, -8, 13, -21, 34, -55]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 1 -1 0 0 0 0 0 0 0 0 current = 1 -1 1 0 0 0 0 0 0 0 current = 1 -1 2 0 0 0 0 0 0 0 current = 1 -1 2 -2 0 0 0 0 0 0 current = 1 -1 2 -3 0 0 0 0 0 0 current = 1 -1 2 -3 3 0 0 0 0 0 current = 1 -1 2 -3 5 0 0 0 0 0 current = 1 -1 2 -3 5 -5 0 0 0 0 current = 1 -1 2 -3 5 -8 0 0 0 0 current = 1 -1 2 -3 5 -8 8 0 0 0 current = 1 -1 2 -3 5 -8 13 0 0 0 current = 1 -1 2 -3 5 -8 13 -13 0 0 current = 1 -1 2 -3 5 -8 13 -21 0 0 current = 1 -1 2 -3 5 -8 13 -21 21 0 current = 1 -1 2 -3 5 -8 13 -21 34 0 current = 1 -1 2 -3 5 -8 13 -21 34 -34 current = 1 -1 2 -3 5 -8 13 -21 34 -55 values = 1 -1 2 -3 5 -8 13 -21 34 -55 values = 1 -1 2 -3 5 -8 13 -21 34 -55

14   Pass
Init = [1, -1]; Rules = [-1, 1]; N = 1:10; values_correct = [1, -1, -2, -1, 1, 2, 1, -1, -2, -1]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 1 -1 0 0 0 0 0 0 0 0 current = 1 -1 -1 0 0 0 0 0 0 0 current = 1 -1 -2 0 0 0 0 0 0 0 current = 1 -1 -2 -2 0 0 0 0 0 0 current = 1 -1 -2 -1 0 0 0 0 0 0 current = 1 -1 -2 -1 -1 0 0 0 0 0 current = 1 -1 -2 -1 1 0 0 0 0 0 current = 1 -1 -2 -1 1 1 0 0 0 0 current = 1 -1 -2 -1 1 2 0 0 0 0 current = 1 -1 -2 -1 1 2 2 0 0 0 current = 1 -1 -2 -1 1 2 1 0 0 0 current = 1 -1 -2 -1 1 2 1 1 0 0 current = 1 -1 -2 -1 1 2 1 -1 0 0 current = 1 -1 -2 -1 1 2 1 -1 -1 0 current = 1 -1 -2 -1 1 2 1 -1 -2 0 current = 1 -1 -2 -1 1 2 1 -1 -2 -2 current = 1 -1 -2 -1 1 2 1 -1 -2 -1 values = 1 -1 -2 -1 1 2 1 -1 -2 -1 values = 1 -1 -2 -1 1 2 1 -1 -2 -1

15   Pass
Init = [1, -1]; Rules = [1, 1]; N = 1:10; values_correct = [1, -1, 0, -1, -1, -2, -3, -5, -8, -13]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 1 -1 0 0 0 0 0 0 0 0 current = 1 -1 -1 0 0 0 0 0 0 0 current = 1 -1 0 0 0 0 0 0 0 0 current = 1 -1 0 0 0 0 0 0 0 0 current = 1 -1 0 -1 0 0 0 0 0 0 current = 1 -1 0 -1 -1 0 0 0 0 0 current = 1 -1 0 -1 -1 0 0 0 0 0 current = 1 -1 0 -1 -1 -1 0 0 0 0 current = 1 -1 0 -1 -1 -2 0 0 0 0 current = 1 -1 0 -1 -1 -2 -2 0 0 0 current = 1 -1 0 -1 -1 -2 -3 0 0 0 current = 1 -1 0 -1 -1 -2 -3 -3 0 0 current = 1 -1 0 -1 -1 -2 -3 -5 0 0 current = 1 -1 0 -1 -1 -2 -3 -5 -5 0 current = 1 -1 0 -1 -1 -2 -3 -5 -8 0 current = 1 -1 0 -1 -1 -2 -3 -5 -8 -8 current = 1 -1 0 -1 -1 -2 -3 -5 -8 -13 values = 1 -1 0 -1 -1 -2 -3 -5 -8 -13 values = 1 -1 0 -1 -1 -2 -3 -5 -8 -13

16   Pass
Init = [1, 1]; Rules = [2, -1]; N = 1:10; values_correct = ones(1,10); assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 1 1 0 0 0 0 0 0 0 0 current = 1 1 -1 0 0 0 0 0 0 0 current = 1 1 1 0 0 0 0 0 0 0 current = 1 1 1 -1 0 0 0 0 0 0 current = 1 1 1 1 0 0 0 0 0 0 current = 1 1 1 1 -1 0 0 0 0 0 current = 1 1 1 1 1 0 0 0 0 0 current = 1 1 1 1 1 -1 0 0 0 0 current = 1 1 1 1 1 1 0 0 0 0 current = 1 1 1 1 1 1 -1 0 0 0 current = 1 1 1 1 1 1 1 0 0 0 current = 1 1 1 1 1 1 1 -1 0 0 current = 1 1 1 1 1 1 1 1 0 0 current = 1 1 1 1 1 1 1 1 -1 0 current = 1 1 1 1 1 1 1 1 1 0 current = 1 1 1 1 1 1 1 1 1 -1 current = 1 1 1 1 1 1 1 1 1 1 values = 1 1 1 1 1 1 1 1 1 1 values = 1 1 1 1 1 1 1 1 1 1

17   Pass
Init = [1, 2]; Rules = [2, -1]; N = 1:10; values_correct = [1, 2, 0, 4, -4, 12, -20, 44, -84, 172]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 1 2 0 0 0 0 0 0 0 0 current = 1 2 -2 0 0 0 0 0 0 0 current = 1 2 0 0 0 0 0 0 0 0 current = 1 2 0 0 0 0 0 0 0 0 current = 1 2 0 4 0 0 0 0 0 0 current = 1 2 0 4 -4 0 0 0 0 0 current = 1 2 0 4 -4 0 0 0 0 0 current = 1 2 0 4 -4 4 0 0 0 0 current = 1 2 0 4 -4 12 0 0 0 0 current = 1 2 0 4 -4 12 -12 0 0 0 current = 1 2 0 4 -4 12 -20 0 0 0 current = 1 2 0 4 -4 12 -20 20 0 0 current = 1 2 0 4 -4 12 -20 44 0 0 current = 1 2 0 4 -4 12 -20 44 -44 0 current = 1 2 0 4 -4 12 -20 44 -84 0 current = 1 2 0 4 -4 12 -20 44 -84 84 current = 1 2 0 4 -4 12 -20 44 -84 172 values = 1 2 0 4 -4 12 -20 44 -84 172 values = 1 2 0 4 -4 12 -20 44 -84 172

18   Pass
Init = [0, 1]; Rules = [2, 1]; N = 1:10; values_correct = [0, 1, 1, 3, 5, 11, 21, 43, 85, 171]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 0 1 0 0 0 0 0 0 0 0 current = 0 1 1 0 0 0 0 0 0 0 current = 0 1 1 0 0 0 0 0 0 0 current = 0 1 1 1 0 0 0 0 0 0 current = 0 1 1 3 0 0 0 0 0 0 current = 0 1 1 3 3 0 0 0 0 0 current = 0 1 1 3 5 0 0 0 0 0 current = 0 1 1 3 5 5 0 0 0 0 current = 0 1 1 3 5 11 0 0 0 0 current = 0 1 1 3 5 11 11 0 0 0 current = 0 1 1 3 5 11 21 0 0 0 current = 0 1 1 3 5 11 21 21 0 0 current = 0 1 1 3 5 11 21 43 0 0 current = 0 1 1 3 5 11 21 43 43 0 current = 0 1 1 3 5 11 21 43 85 0 current = 0 1 1 3 5 11 21 43 85 85 current = 0 1 1 3 5 11 21 43 85 171 values = 0 1 1 3 5 11 21 43 85 171 values = 0 1 1 3 5 11 21 43 85 171

19   Pass
Init = [1, 0, 2]; Rules = [-1 1 1]; N = 1:20; values_correct = [1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9]; assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

current = 0 current = 0 0 current = 0 0 0 current = 0 0 0 0 current = 0 0 0 0 0 current = 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 5 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 0 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 4 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 6 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 0 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 3 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 7 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 0 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 5 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 8 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 0 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 4 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 9 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 0 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 6 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 10 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 0 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 5 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 11 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 0 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 7 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 12 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 0 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 6 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 13 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 0 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 8 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 14 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 0 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 7 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 15 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 0 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 9 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 16 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 0 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 8 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 17 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 0 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 10 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 18 current = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 values = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 values = 1 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9