Cody

Solution 1894476

Submitted on 8 Aug 2019 by jack walker
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 = fib_seq(34); assert(isequal(X(end),21) && length(X)==8)

y = 1 1 2 n = 4 y = 1 1 2 3 n = 5 y = 1 1 2 3 5 n = 6 y = 1 1 2 3 5 8 n = 7 y = 1 1 2 3 5 8 13 n = 8 y = 1 1 2 3 5 8 13 21 n = 9

2   Pass
X = fib_seq(35); assert(isequal(X(end),34) && length(X)==9)

y = 1 1 2 n = 4 y = 1 1 2 3 n = 5 y = 1 1 2 3 5 n = 6 y = 1 1 2 3 5 8 n = 7 y = 1 1 2 3 5 8 13 n = 8 y = 1 1 2 3 5 8 13 21 n = 9 y = 1 1 2 3 5 8 13 21 34 n = 10

3   Pass
X = fib_seq(145); assert(isequal(X(end),144) && length(X)==12)

y = 1 1 2 n = 4 y = 1 1 2 3 n = 5 y = 1 1 2 3 5 n = 6 y = 1 1 2 3 5 8 n = 7 y = 1 1 2 3 5 8 13 n = 8 y = 1 1 2 3 5 8 13 21 n = 9 y = 1 1 2 3 5 8 13 21 34 n = 10 y = 1 1 2 3 5 8 13 21 34 55 n = 11 y = 1 1 2 3 5 8 13 21 34 55 89 n = 12 y = 1 1 2 3 5 8 13 21 34 55 89 144 n = 13

4   Pass
X = fib_seq(4196); assert(isequal(X(end),4181) && length(X)==19)

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

5   Pass
X = fib_seq(987419996); assert(isequal(X(end),701408733) && length(X)==44)

y = 1 1 2 n = 4 y = 1 1 2 3 n = 5 y = 1 1 2 3 5 n = 6 y = 1 1 2 3 5 8 n = 7 y = 1 1 2 3 5 8 13 n = 8 y = 1 1 2 3 5 8 13 21 n = 9 y = 1 1 2 3 5 8 13 21 34 n = 10 y = 1 1 2 3 5 8 13 21 34 55 n = 11 y = 1 1 2 3 5 8 13 21 34 55 89 n = 12 y = 1 1 2 3 5 8 13 21 34 55 89 144 n = 13 y = 1 1 2 3 5 8 13 21 34 55 89 144 233 n = 14 y = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 n = 15 y = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 n = 16 y = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 n = 17 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 17 987 1597 n = 18 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 18 987 1597 2584 n = 19 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 19 987 1597 2584 4181 n = 20 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 20 987 1597 2584 4181 6765 n = 21 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 21 987 1597 2584 4181 6765 10946 n = 22 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 22 987 1597 2584 4181 6765 10946 17711 n = 23 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 23 987 1597 2584 4181 6765 10946 17711 28657 n = 24 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 24 987 1597 2584 4181 6765 10946 17711 28657 46368 n = 25 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 25 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 n = 26 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 26 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 n = 27 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 27 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 n = 28 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 28 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 n = 29 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 29 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 n = 30 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 n = 31 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Column 31 1346269 n = 32 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 32 1346269 2178309 n = 33 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 33 1346269 2178309 3524578 n = 34 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 34 1346269 2178309 3524578 5702887 n = 35 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 35 1346269 2178309 3524578 5702887 9227465 n = 36 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 36 1346269 2178309 3524578 5702887 9227465 14930352 n = 37 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 37 1346269 2178309 3524578 5702887 9227465 14930352 24157817 n = 38 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418...

6   Pass
X = fib_seq(1134903171); assert(isequal(X(end),1134903170) && length(X)==45)

y = 1 1 2 n = 4 y = 1 1 2 3 n = 5 y = 1 1 2 3 5 n = 6 y = 1 1 2 3 5 8 n = 7 y = 1 1 2 3 5 8 13 n = 8 y = 1 1 2 3 5 8 13 21 n = 9 y = 1 1 2 3 5 8 13 21 34 n = 10 y = 1 1 2 3 5 8 13 21 34 55 n = 11 y = 1 1 2 3 5 8 13 21 34 55 89 n = 12 y = 1 1 2 3 5 8 13 21 34 55 89 144 n = 13 y = 1 1 2 3 5 8 13 21 34 55 89 144 233 n = 14 y = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 n = 15 y = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 n = 16 y = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 n = 17 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 17 987 1597 n = 18 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 18 987 1597 2584 n = 19 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 19 987 1597 2584 4181 n = 20 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 20 987 1597 2584 4181 6765 n = 21 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 21 987 1597 2584 4181 6765 10946 n = 22 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 22 987 1597 2584 4181 6765 10946 17711 n = 23 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 23 987 1597 2584 4181 6765 10946 17711 28657 n = 24 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 24 987 1597 2584 4181 6765 10946 17711 28657 46368 n = 25 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 25 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 n = 26 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 26 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 n = 27 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 27 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 n = 28 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 28 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 n = 29 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 29 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 n = 30 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 n = 31 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Column 31 1346269 n = 32 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 32 1346269 2178309 n = 33 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 33 1346269 2178309 3524578 n = 34 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 34 1346269 2178309 3524578 5702887 n = 35 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 35 1346269 2178309 3524578 5702887 9227465 n = 36 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 36 1346269 2178309 3524578 5702887 9227465 14930352 n = 37 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 37 1346269 2178309 3524578 5702887 9227465 14930352 24157817 n = 38 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418...

7   Pass
X = fib_seq(98691443031971); assert(isequal(X(end),72723460248141) && length(X)==68)

y = 1 1 2 n = 4 y = 1 1 2 3 n = 5 y = 1 1 2 3 5 n = 6 y = 1 1 2 3 5 8 n = 7 y = 1 1 2 3 5 8 13 n = 8 y = 1 1 2 3 5 8 13 21 n = 9 y = 1 1 2 3 5 8 13 21 34 n = 10 y = 1 1 2 3 5 8 13 21 34 55 n = 11 y = 1 1 2 3 5 8 13 21 34 55 89 n = 12 y = 1 1 2 3 5 8 13 21 34 55 89 144 n = 13 y = 1 1 2 3 5 8 13 21 34 55 89 144 233 n = 14 y = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 n = 15 y = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 n = 16 y = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 n = 17 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 17 987 1597 n = 18 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 18 987 1597 2584 n = 19 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 19 987 1597 2584 4181 n = 20 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 20 987 1597 2584 4181 6765 n = 21 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 21 987 1597 2584 4181 6765 10946 n = 22 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 22 987 1597 2584 4181 6765 10946 17711 n = 23 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 23 987 1597 2584 4181 6765 10946 17711 28657 n = 24 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 24 987 1597 2584 4181 6765 10946 17711 28657 46368 n = 25 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 25 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 n = 26 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 26 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 n = 27 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 27 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 n = 28 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 28 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 n = 29 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 29 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 n = 30 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 n = 31 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Column 31 1346269 n = 32 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 32 1346269 2178309 n = 33 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 33 1346269 2178309 3524578 n = 34 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 34 1346269 2178309 3524578 5702887 n = 35 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 35 1346269 2178309 3524578 5702887 9227465 n = 36 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 36 1346269 2178309 3524578 5702887 9227465 14930352 n = 37 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 Columns 31 through 37 1346269 2178309 3524578 5702887 9227465 14930352 24157817 n = 38 y = Columns 1 through 15 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 Columns 16 through 30 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418...