Cody

# Problem 2423. Integer Sequence - II : New Fibonacci

Solution 1827613

Submitted on 27 May 2019 by Hans Kramer
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
assert(isequal(newFibo(1),1))

n = 6000000 array = 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 index = 1 1 2 3 5 8 13 21 34 y = 1

2   Pass
assert(isequal(newFibo(2),1))

n = 6000000 array = 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 index = 1 1 2 3 5 8 13 21 34 y = 1

3   Pass
assert(isequal(newFibo(3),1))

n = 6000000 array = 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 index = 1 1 2 3 5 8 13 21 34 y = 1

4   Pass
assert(isequal(newFibo(4),2))

n = 6000000 array = 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 index = 1 1 2 3 5 8 13 21 34 y = 2

5   Pass
assert(isequal(newFibo(5),5))

n = 6000000 array = 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 index = 1 1 2 3 5 8 13 21 34 y = 5

6   Pass
assert(isequal(newFibo(6),21))

n = 6000000 array = 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 index = 1 1 2 3 5 8 13 21 34 y = 21

7   Pass
assert(isequal(newFibo(8),10946))

n = 6000000 array = 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 index = 1 1 2 3 5 8 13 21 34 y = 10946

8   Pass
assert(isequal(newFibo(9),5702887))

n = 6000000 array = 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 index = 1 1 2 3 5 8 13 21 34 y = 5702887