Cody

# Problem 8057. (Linear) Recurrence Equations - Generalised Fibonacci-like sequences

Solution 1921018

Submitted on 3 Sep 2019
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
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))

ylin = 10 alin = 1 arvojoukko = 1 indeksi = 2 arvojoukko = 1 1 indeksi = 3 arvojoukko = 1 1 2 indeksi = 4 arvojoukko = 1 1 2 3 indeksi = 5 arvojoukko = 1 1 2 3 5 indeksi = 6 arvojoukko = 1 1 2 3 5 8 indeksi = 7 arvojoukko = 1 1 2 3 5 8 13 indeksi = 8 arvojoukko = 1 1 2 3 5 8 13 21 indeksi = 9 arvojoukko = 1 1 2 3 5 8 13 21 34 indeksi = 10 arvojoukko = 1 1 2 3 5 8 13 21 34 55 indeksi = 11

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test1 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

2   Fail
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))

ylin = 10 alin = 1 arvojoukko = 2 indeksi = 2 arvojoukko = 2 3 indeksi = 3 arvojoukko = 2 3 5 indeksi = 4 arvojoukko = 2 3 5 8 indeksi = 5 arvojoukko = 2 3 5 8 13 indeksi = 6 arvojoukko = 2 3 5 8 13 21 indeksi = 7 arvojoukko = 2 3 5 8 13 21 34 indeksi = 8 arvojoukko = 2 3 5 8 13 21 34 55 indeksi = 9 arvojoukko = 2 3 5 8 13 21 34 55 89 indeksi = 10 arvojoukko = 2 3 5 8 13 21 34 55 89 144 indeksi = 11

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test2 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

3   Fail
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))

ylin = 5 alin = -5 arvojoukko = 1 indeksi = 2 arvojoukko = 1 1 indeksi = 3 arvojoukko = 1 1 2 indeksi = 4 arvojoukko = 1 1 2 3 indeksi = 5 arvojoukko = 1 1 2 3 5 indeksi = 6

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test3 (line 6) values = recurrence_seq(N, Init, Rules);

4   Fail
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))

ylin = 10 alin = 1 arvojoukko = 1 indeksi = 2 arvojoukko = 1 3 indeksi = 3 arvojoukko = 1 3 4 indeksi = 4 arvojoukko = 1 3 4 7 indeksi = 5 arvojoukko = 1 3 4 7 11 indeksi = 6 arvojoukko = 1 3 4 7 11 18 indeksi = 7 arvojoukko = 1 3 4 7 11 18 29 indeksi = 8 arvojoukko = 1 3 4 7 11 18 29 47 indeksi = 9 arvojoukko = 1 3 4 7 11 18 29 47 76 indeksi = 10 arvojoukko = 1 3 4 7 11 18 29 47 76 123 indeksi = 11

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test4 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

5   Fail
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))

ylin = 21 alin = 4 arvojoukko = 1 indeksi = 2 arvojoukko = 1 1 indeksi = 3 arvojoukko = 1 1 1 indeksi = 4 arvojoukko = 1 1 1 2 indeksi = 5 arvojoukko = 1 1 1 2 3 indeksi = 6 arvojoukko = 1 1 1 2 3 5 indeksi = 7 arvojoukko = 1 1 1 2 3 5 8 indeksi = 8 arvojoukko = 1 1 1 2 3 5 8 13 indeksi = 9 arvojoukko = 1 1 1 2 3 5 8 13 21 indeksi = 10 arvojoukko = 1 1 1 2 3 5 8 13 21 34 indeksi = 11 arvojoukko = 1 1 1 2 3 5 8 13 21 34 55 indeksi = 12 arvojoukko = 1 1 1 2 3 5 8 13 21 34 55 89 indeksi = 13 arvojoukko = 1 1 1 2 3 5 8 13 21 34 55 89 144 indeksi = 14 arvojoukko = 1 1 1 2 3 5 8 13 21 34 55 89 144 233 indeksi = 15 arvojoukko = 1 1 1 2 3 5 8 13 21 34 55 89 144 233 377 indeksi = 16 arvojoukko = 1 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 indeksi = 17 arvojoukko = 1 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 indeksi = 18 arvojoukko = Columns 1 through 15 1 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 16 through 18 610 987 1597 indeksi = 19 arvojoukko = Columns 1 through 15 1 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 16 through 19 610 987 1597 2584 indeksi = 20 arvojoukko = Columns 1 through 15 1 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 16 through 20 610 987 1597 2584 4181 indeksi = 21 arvojoukko = Columns 1 through 15 1 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 16 through 21 610 987 1597 2584 4181 6765 indeksi = 22

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test5 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

6   Fail
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))

ylin = 19 alin = 4 arvojoukko = 0 indeksi = 2 arvojoukko = 0 1 indeksi = 3 arvojoukko = 0 1 1 indeksi = 4 arvojoukko = 0 1 1 3 indeksi = 5 arvojoukko = 0 1 1 3 5 indeksi = 6 arvojoukko = 0 1 1 3 5 11 indeksi = 7 arvojoukko = 0 1 1 3 5 11 21 indeksi = 8 arvojoukko = 0 1 1 3 5 11 21 43 indeksi = 9 arvojoukko = 0 1 1 3 5 11 21 43 85 indeksi = 10 arvojoukko = 0 1 1 3 5 11 21 43 85 171 indeksi = 11 arvojoukko = 0 1 1 3 5 11 21 43 85 171 341 indeksi = 12 arvojoukko = 0 1 1 3 5 11 21 43 85 171 341 683 indeksi = 13 arvojoukko = 0 1 1 3 5 11 21 43 85 171 341 683 1365 indeksi = 14 arvojoukko = 0 1 1 3 5 11 21 43 85 171 341 683 1365 2731 indeksi = 15 arvojoukko = 0 1 1 3 5 11 21 43 85 171 341 683 1365 2731 5461 indeksi = 16 arvojoukko = Columns 1 through 15 0 1 1 3 5 11 21 43 85 171 341 683 1365 2731 5461 Column 16 10923 indeksi = 17 arvojoukko = Columns 1 through 15 0 1 1 3 5 11 21 43 85 171 341 683 1365 2731 5461 Columns 16 through 17 10923 21845 indeksi = 18 arvojoukko = Columns 1 through 15 0 1 1 3 5 11 21 43 85 171 341 683 1365 2731 5461 Columns 16 through 18 10923 21845 43691 indeksi = 19 arvojoukko = Columns 1 through 15 0 1 1 3 5 11 21 43 85 171 341 683 1365 2731 5461 Columns 16 through 19 10923 21845 43691 87381 indeksi = 20

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test6 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

7   Fail
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))

ylin = 10 alin = 1 arvojoukko = 1 indeksi = 2 arvojoukko = 1 5 indeksi = 3 arvojoukko = 1 5 -25 indeksi = 4 arvojoukko = 1 5 -25 175 indeksi = 5 arvojoukko = 1 5 -25 175 -1175 indeksi = 6 arvojoukko = 1 5 -25 175 -1175 7925 indeksi = 7 arvojoukko = 1 5 -25 175 -1175 7925 -53425 indeksi = 8 arvojoukko = 1 5 -25 175 -1175 7925 -53425 360175 indeksi = 9 arvojoukko = 1 5 -25 175 -1175 7925 -53425 360175 -2428175 indeksi = 10 arvojoukko = 1 5 -25 175 -1175 7925 -53425 360175 -2428175 16369925 indeksi = 11

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test7 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

8   Fail
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))

ylin = 38 alin = 1 arvojoukko = 3 indeksi = 2 arvojoukko = 3 0 indeksi = 3 arvojoukko = 3 0 2 indeksi = 4 arvojoukko = 3 0 2 2 indeksi = 5 arvojoukko = 3 0 2 2 4 indeksi = 6 arvojoukko = 3 0 2 2 4 6 indeksi = 7 arvojoukko = 3 0 2 2 4 6 10 indeksi = 8 arvojoukko = 3 0 2 2 4 6 10 16 indeksi = 9 arvojoukko = 3 0 2 2 4 6 10 16 26 indeksi = 10 arvojoukko = 3 0 2 2 4 6 10 16 26 42 indeksi = 11 arvojoukko = 3 0 2 2 4 6 10 16 26 42 68 indeksi = 12 arvojoukko = 3 0 2 2 4 6 10 16 26 42 68 110 indeksi = 13 arvojoukko = 3 0 2 2 4 6 10 16 26 42 68 110 178 indeksi = 14 arvojoukko = 3 0 2 2 4 6 10 16 26 42 68 110 178 288 indeksi = 15 arvojoukko = 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 indeksi = 16 arvojoukko = 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 754 indeksi = 17 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 17 754 1220 indeksi = 18 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 18 754 1220 1974 indeksi = 19 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 19 754 1220 1974 3194 indeksi = 20 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 20 754 1220 1974 3194 5168 indeksi = 21 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 21 754 1220 1974 3194 5168 8362 indeksi = 22 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 22 754 1220 1974 3194 5168 8362 13530 indeksi = 23 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 23 754 1220 1974 3194 5168 8362 13530 21892 indeksi = 24 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 24 754 1220 1974 3194 5168 8362 13530 21892 35422 indeksi = 25 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 25 754 1220 1974 3194 5168 8362 13530 21892 35422 57314 indeksi = 26 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 26 754 1220 1974 3194 5168 8362 13530 21892 35422 57314 92736 indeksi = 27 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 27 754 1220 1974 3194 5168 8362 13530 21892 35422 57314 92736 150050 indeksi = 28 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 28 754 1220 1974 3194 5168 8362 13530 21892 35422 57314 92736 150050 242786 indeksi = 29 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 29 754 1220 1974 3194 5168 8362 13530 21892 35422 57314 92736 150050 242786 392836 indeksi = 30 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 30 754 1220 1974 3194 5168 8362 13530 21892 35422 57314 92736 150050 242786 392836 635622 indeksi = 31 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 30 754 1220 1974 3194 5168 8362 13530 21892 35422 57314 92736 150050 242786 392836 635622 Column 31 1028458 indeksi = 32 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 30 754 1220 1974 3194 5168 8362 13530 21892 35422 57314 92736 150050 242786 392836 635622 Columns 31 through 32 1028458 1664080 indeksi = 33 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 30 754 1220 1974 3194 5168 8362 13530 21892 35422 57314 92736 150050 242786 392836 635622 Columns 31 through 33 1028458 1664080 2692538 indeksi = 34 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 30 754 1220 1974 3194 5168 8362 13530 21892 35422 57314 92736 150050 242786 392836 635622 Columns 31 through 34 1028458 1664080 2692538 4356618 indeksi = 35 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 30 754 1220 1974 3194 5168 8362 13530 21892 35422 57314 92736 150050 242786 392836 635622 Columns 31 through 35 1028458 1664080 2692538 4356618 7049156 indeksi = 36 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 30 754 1220 1974 3194 5168 8362 13530 21892 35422 57314 92736 150050 242786 392836 635622 Columns 31 through 36 1028458 1664080 2692538 4356618 7049156 11405774 indeksi = 37 arvojoukko = Columns 1 through 15 3 0 2 2 4 6 10 16 26 42 68 110 178 288 466 Columns 16 through 30 754 1220 1974 ...

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test8 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

9   Fail
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))

ylin = 15 alin = 1 arvojoukko = 3 indeksi = 2 arvojoukko = 3 0 indeksi = 3 arvojoukko = 3 0 2 indeksi = 4 arvojoukko = 3 0 2 5 indeksi = 5 arvojoukko = 3 0 2 5 7 indeksi = 6 arvojoukko = 3 0 2 5 7 14 indeksi = 7 arvojoukko = 3 0 2 5 7 14 26 indeksi = 8 arvojoukko = 3 0 2 5 7 14 26 47 indeksi = 9 arvojoukko = 3 0 2 5 7 14 26 47 87 indeksi = 10 arvojoukko = 3 0 2 5 7 14 26 47 87 160 indeksi = 11 arvojoukko = 3 0 2 5 7 14 26 47 87 160 294 indeksi = 12 arvojoukko = 3 0 2 5 7 14 26 47 87 160 294 541 indeksi = 13 arvojoukko = 3 0 2 5 7 14 26 47 87 160 294 541 995 indeksi = 14 arvojoukko = 3 0 2 5 7 14 26 47 87 160 294 541 995 1830 indeksi = 15 arvojoukko = 3 0 2 5 7 14 26 47 87 160 294 541 995 1830 3366 indeksi = 16

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test9 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

10   Fail
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))

ylin = 23 alin = 1 arvojoukko = 0 indeksi = 2 arvojoukko = 0 0 indeksi = 3 arvojoukko = 0 0 1 indeksi = 4 arvojoukko = 0 0 1 1 indeksi = 5 arvojoukko = 0 0 1 1 2 indeksi = 6 arvojoukko = 0 0 1 1 2 4 indeksi = 7 arvojoukko = 0 0 1 1 2 4 7 indeksi = 8 arvojoukko = 0 0 1 1 2 4 7 13 indeksi = 9 arvojoukko = 0 0 1 1 2 4 7 13 24 indeksi = 10 arvojoukko = 0 0 1 1 2 4 7 13 24 44 indeksi = 11 arvojoukko = 0 0 1 1 2 4 7 13 24 44 81 indeksi = 12 arvojoukko = 0 0 1 1 2 4 7 13 24 44 81 149 indeksi = 13 arvojoukko = 0 0 1 1 2 4 7 13 24 44 81 149 274 indeksi = 14 arvojoukko = 0 0 1 1 2 4 7 13 24 44 81 149 274 504 indeksi = 15 arvojoukko = 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 indeksi = 16 arvojoukko = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Column 16 1705 indeksi = 17 arvojoukko = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Columns 16 through 17 1705 3136 indeksi = 18 arvojoukko = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Columns 16 through 18 1705 3136 5768 indeksi = 19 arvojoukko = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Columns 16 through 19 1705 3136 5768 10609 indeksi = 20 arvojoukko = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Columns 16 through 20 1705 3136 5768 10609 19513 indeksi = 21 arvojoukko = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Columns 16 through 21 1705 3136 5768 10609 19513 35890 indeksi = 22 arvojoukko = Columns 1 through 15 0 0 1 1 2 4 7 13 24 44 81 149 274 504 927 Columns 16 through 22 1705 3136 5768 10609 19513 35890 66012 indeksi = 23 arvojoukko = 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 5768 10609 19513 35890 66012 121415 indeksi = 24

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test10 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

11   Fail
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))

ylin = 23 alin = 20 arvojoukko = 0 indeksi = 2 arvojoukko = 0 0 indeksi = 3 arvojoukko = 0 0 0 indeksi = 4 arvojoukko = 0 0 0 1 indeksi = 5 arvojoukko = 0 0 0 1 1 indeksi = 6 arvojoukko = 0 0 0 1 1 2 indeksi = 7 arvojoukko = 0 0 0 1 1 2 4 indeksi = 8 arvojoukko = 0 0 0 1 1 2 4 8 indeksi = 9 arvojoukko = 0 0 0 1 1 2 4 8 15 indeksi = 10 arvojoukko = 0 0 0 1 1 2 4 8 15 29 indeksi = 11 arvojoukko = 0 0 0 1 1 2 4 8 15 29 56 indeksi = 12 arvojoukko = 0 0 0 1 1 2 4 8 15 29 56 108 indeksi = 13 arvojoukko = 0 0 0 1 1 2 4 8 15 29 56 108 208 indeksi = 14 arvojoukko = 0 0 0 1 1 2 4 8 15 29 56 108 208 401 indeksi = 15 arvojoukko = 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 indeksi = 16 arvojoukko = Columns 1 through 15 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 Column 16 1490 indeksi = 17 arvojoukko = Columns 1 through 15 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 Columns 16 through 17 1490 2872 indeksi = 18 arvojoukko = Columns 1 through 15 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 Columns 16 through 18 1490 2872 5536 indeksi = 19 arvojoukko = Columns 1 through 15 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 Columns 16 through 19 1490 2872 5536 10671 indeksi = 20 arvojoukko = Columns 1 through 15 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 Columns 16 through 20 1490 2872 5536 10671 20569 indeksi = 21 arvojoukko = Columns 1 through 15 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 Columns 16 through 21 1490 2872 5536 10671 20569 39648 indeksi = 22 arvojoukko = Columns 1 through 15 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 Columns 16 through 22 1490 2872 5536 10671 20569 39648 76424 indeksi = 23 arvojoukko = Columns 1 through 15 0 0 0 1 1 2 4 8 15 29 56 108 208 401 773 Columns 16 through 23 1490 2872 5536 10671 20569 39648 76424 147312 indeksi = 24

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test11 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

12   Fail
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))

ylin = 19 alin = 7 arvojoukko = 0 indeksi = 2 arvojoukko = 0 0 indeksi = 3 arvojoukko = 0 0 0 indeksi = 4 arvojoukko = 0 0 0 0 indeksi = 5 arvojoukko = 0 0 0 0 0 indeksi = 6 arvojoukko = 0 0 0 0 0 0 indeksi = 7 arvojoukko = 0 0 0 0 0 0 1 indeksi = 8 arvojoukko = 0 0 0 0 0 0 1 1 indeksi = 9 arvojoukko = 0 0 0 0 0 0 1 1 2 indeksi = 10 arvojoukko = 0 0 0 0 0 0 1 1 2 4 indeksi = 11 arvojoukko = 0 0 0 0 0 0 1 1 2 4 8 indeksi = 12 arvojoukko = 0 0 0 0 0 0 1 1 2 4 8 16 indeksi = 13 arvojoukko = 0 0 0 0 0 0 1 1 2 4 8 16 32 indeksi = 14 arvojoukko = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 indeksi = 15 arvojoukko = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 indeksi = 16 arvojoukko = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 253 indeksi = 17 arvojoukko = 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 253 504 indeksi = 18 arvojoukko = Columns 1 through 15 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 Columns 16 through 18 253 504 1004 indeksi = 19 arvojoukko = Columns 1 through 15 0 0 0 0 0 0 1 1 2 4 8 16 32 64 127 Columns 16 through 19 253 504 1004 2000 indeksi = 20

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test12 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

13   Fail
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))

ylin = 10 alin = 1 arvojoukko = 1 indeksi = 2 arvojoukko = 1 -1 indeksi = 3 arvojoukko = 1 -1 -2 indeksi = 4 arvojoukko = 1 -1 -2 -1 indeksi = 5 arvojoukko = 1 -1 -2 -1 1 indeksi = 6 arvojoukko = 1 -1 -2 -1 1 2 indeksi = 7 arvojoukko = 1 -1 -2 -1 1 2 1 indeksi = 8 arvojoukko = 1 -1 -2 -1 1 2 1 -1 indeksi = 9 arvojoukko = 1 -1 -2 -1 1 2 1 -1 -2 indeksi = 10 arvojoukko = 1 -1 -2 -1 1 2 1 -1 -2 -1 indeksi = 11

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test13 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

14   Fail
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))

ylin = 10 alin = 1 arvojoukko = 1 indeksi = 2 arvojoukko = 1 -1 indeksi = 3 arvojoukko = 1 -1 2 indeksi = 4 arvojoukko = 1 -1 2 -3 indeksi = 5 arvojoukko = 1 -1 2 -3 5 indeksi = 6 arvojoukko = 1 -1 2 -3 5 -8 indeksi = 7 arvojoukko = 1 -1 2 -3 5 -8 13 indeksi = 8 arvojoukko = 1 -1 2 -3 5 -8 13 -21 indeksi = 9 arvojoukko = 1 -1 2 -3 5 -8 13 -21 34 indeksi = 10 arvojoukko = 1 -1 2 -3 5 -8 13 -21 34 -55 indeksi = 11

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test14 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

15   Fail
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))

ylin = 10 alin = 1 arvojoukko = 1 indeksi = 2 arvojoukko = 1 -1 indeksi = 3 arvojoukko = 1 -1 0 indeksi = 4 arvojoukko = 1 -1 0 -1 indeksi = 5 arvojoukko = 1 -1 0 -1 -1 indeksi = 6 arvojoukko = 1 -1 0 -1 -1 -2 indeksi = 7 arvojoukko = 1 -1 0 -1 -1 -2 -3 indeksi = 8 arvojoukko = 1 -1 0 -1 -1 -2 -3 -5 indeksi = 9 arvojoukko = 1 -1 0 -1 -1 -2 -3 -5 -8 indeksi = 10 arvojoukko = 1 -1 0 -1 -1 -2 -3 -5 -8 -13 indeksi = 11

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test15 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

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

ylin = 10 alin = 1 arvojoukko = 1 indeksi = 2 arvojoukko = 1 1 indeksi = 3 arvojoukko = 1 1 1 indeksi = 4 arvojoukko = 1 1 1 1 indeksi = 5 arvojoukko = 1 1 1 1 1 indeksi = 6 arvojoukko = 1 1 1 1 1 1 indeksi = 7 arvojoukko = 1 1 1 1 1 1 1 indeksi = 8 arvojoukko = 1 1 1 1 1 1 1 1 indeksi = 9 arvojoukko = 1 1 1 1 1 1 1 1 1 indeksi = 10 arvojoukko = 1 1 1 1 1 1 1 1 1 1 indeksi = 11

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test16 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

17   Fail
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))

ylin = 10 alin = 1 arvojoukko = 1 indeksi = 2 arvojoukko = 1 2 indeksi = 3 arvojoukko = 1 2 3 indeksi = 4 arvojoukko = 1 2 3 4 indeksi = 5 arvojoukko = 1 2 3 4 5 indeksi = 6 arvojoukko = 1 2 3 4 5 6 indeksi = 7 arvojoukko = 1 2 3 4 5 6 7 indeksi = 8 arvojoukko = 1 2 3 4 5 6 7 8 indeksi = 9 arvojoukko = 1 2 3 4 5 6 7 8 9 indeksi = 10 arvojoukko = 1 2 3 4 5 6 7 8 9 10 indeksi = 11

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test17 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

18   Fail
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))

ylin = 10 alin = 1 arvojoukko = 0 indeksi = 2 arvojoukko = 0 1 indeksi = 3 arvojoukko = 0 1 2 indeksi = 4 arvojoukko = 0 1 2 5 indeksi = 5 arvojoukko = 0 1 2 5 12 indeksi = 6 arvojoukko = 0 1 2 5 12 29 indeksi = 7 arvojoukko = 0 1 2 5 12 29 70 indeksi = 8 arvojoukko = 0 1 2 5 12 29 70 169 indeksi = 9 arvojoukko = 0 1 2 5 12 29 70 169 408 indeksi = 10 arvojoukko = 0 1 2 5 12 29 70 169 408 985 indeksi = 11

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test18 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))

19   Fail
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))

ylin = 20 alin = 1 arvojoukko = 1 indeksi = 2 arvojoukko = 1 0 indeksi = 3 arvojoukko = 1 0 2 indeksi = 4 arvojoukko = 1 0 2 -1 indeksi = 5 arvojoukko = 1 0 2 -1 3 indeksi = 6 arvojoukko = 1 0 2 -1 3 -2 indeksi = 7 arvojoukko = 1 0 2 -1 3 -2 4 indeksi = 8 arvojoukko = 1 0 2 -1 3 -2 4 -3 indeksi = 9 arvojoukko = 1 0 2 -1 3 -2 4 -3 5 indeksi = 10 arvojoukko = 1 0 2 -1 3 -2 4 -3 5 -4 indeksi = 11 arvojoukko = 1 0 2 -1 3 -2 4 -3 5 -4 6 indeksi = 12 arvojoukko = 1 0 2 -1 3 -2 4 -3 5 -4 6 -5 indeksi = 13 arvojoukko = 1 0 2 -1 3 -2 4 -3 5 -4 6 -5 7 indeksi = 14 arvojoukko = 1 0 2 -1 3 -2 4 -3 5 -4 6 -5 7 -6 indeksi = 15 arvojoukko = 1 0 2 -1 3 -2 4 -3 5 -4 6 -5 7 -6 8 indeksi = 16 arvojoukko = 1 0 2 -1 3 -2 4 -3 5 -4 6 -5 7 -6 8 -7 indeksi = 17 arvojoukko = 1 0 2 -1 3 -2 4 -3 5 -4 6 -5 7 -6 8 -7 9 indeksi = 18 arvojoukko = 1 0 2 -1 3 -2 4 -3 5 -4 6 -5 7 -6 8 -7 9 -8 indeksi = 19 arvojoukko = 1 0 2 -1 3 -2 4 -3 5 -4 6 -5 7 -6 8 -7 9 -8 10 indeksi = 20 arvojoukko = 1 0 2 -1 3 -2 4 -3 5 -4 6 -5 7 -6 8 -7 9 -8 10 -9 indeksi = 21

Output argument "values" (and maybe others) not assigned during call to "recurrence_seq". Error in Test19 (line 5) assert(isequal(recurrence_seq(N, Init, Rules),values_correct))