Cody

# Problem 2423. Integer Sequence - II : New Fibonacci

Solution 3448343

Submitted on 28 Oct 2020 by Undine Falkenhagen
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))

y = 1

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

y = 1

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

fib = 1 1 2 y = 1

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

fib = 1 1 2 fib = 1 1 2 3 y = 2

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

fib = 1 1 2 fib = 1 1 2 3 fib = 1 1 2 3 5 y = 5

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

fib = 1 1 2 fib = 1 1 2 3 fib = 1 1 2 3 5 fib = 1 1 2 3 5 8 fib = 1 1 2 3 5 8 13 fib = 1 1 2 3 5 8 13 21 y = 21

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

fib = 1 1 2 fib = 1 1 2 3 fib = 1 1 2 3 5 fib = 1 1 2 3 5 8 fib = 1 1 2 3 5 8 13 fib = 1 1 2 3 5 8 13 21 fib = 1 1 2 3 5 8 13 21 34 fib = 1 1 2 3 5 8 13 21 34 55 fib = 1 1 2 3 5 8 13 21 34 55 89 fib = 1 1 2 3 5 8 13 21 34 55 89 144 fib = 1 1 2 3 5 8 13 21 34 55 89 144 233 fib = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 fib = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 fib = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 17 610 987 1597 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 18 610 987 1597 2584 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 19 610 987 1597 2584 4181 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 20 610 987 1597 2584 4181 6765 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 21 610 987 1597 2584 4181 6765 10946 y = 10946

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

fib = 1 1 2 fib = 1 1 2 3 fib = 1 1 2 3 5 fib = 1 1 2 3 5 8 fib = 1 1 2 3 5 8 13 fib = 1 1 2 3 5 8 13 21 fib = 1 1 2 3 5 8 13 21 34 fib = 1 1 2 3 5 8 13 21 34 55 fib = 1 1 2 3 5 8 13 21 34 55 89 fib = 1 1 2 3 5 8 13 21 34 55 89 144 fib = 1 1 2 3 5 8 13 21 34 55 89 144 233 fib = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 fib = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 fib = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 17 610 987 1597 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 18 610 987 1597 2584 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 19 610 987 1597 2584 4181 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 20 610 987 1597 2584 4181 6765 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 21 610 987 1597 2584 4181 6765 10946 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 22 610 987 1597 2584 4181 6765 10946 17711 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 23 610 987 1597 2584 4181 6765 10946 17711 28657 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 24 610 987 1597 2584 4181 6765 10946 17711 28657 46368 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 25 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 26 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 27 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 28 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 28 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 Column 29 514229 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 28 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 Columns 29 through 30 514229 832040 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 28 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 Columns 29 through 31 514229 832040 1346269 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 28 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 Columns 29 through 32 514229 832040 1346269 2178309 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 28 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 Columns 29 through 33 514229 832040 1346269 2178309 3524578 fib = Columns 1 through 14 1 1 2 3 5 8 13 21 34 55 89 144 233 377 Columns 15 through 28 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 Columns 29 through 34 514229 832040 1346269 2178309 3524578 5702887 y = 5702887

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!