Cody

# Problem 1946. Fibonacci-Sum of Squares

Solution 1851762

Submitted on 18 Jun 2019 by Albit
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
n = 5; S = 40; assert(isequal(FibSumSquares(n),S))

f = 1 1 g = 2 f = 1 1 2 g = 3 f = 1 1 2 3 g = 5 f = 1 1 2 3 5 f = 1 1 4 9 25 S = 40

2   Pass
n = 8; S = 714; assert(isequal(FibSumSquares(n),S))

f = 1 1 g = 2 f = 1 1 2 g = 3 f = 1 1 2 3 g = 5 f = 1 1 2 3 5 g = 8 f = 1 1 2 3 5 8 g = 13 f = 1 1 2 3 5 8 13 g = 21 f = 1 1 2 3 5 8 13 21 f = 1 1 4 9 25 64 169 441 S = 714

3   Pass
n = 11; S = 12816; assert(isequal(FibSumSquares(n),S))

f = 1 1 g = 2 f = 1 1 2 g = 3 f = 1 1 2 3 g = 5 f = 1 1 2 3 5 g = 8 f = 1 1 2 3 5 8 g = 13 f = 1 1 2 3 5 8 13 g = 21 f = 1 1 2 3 5 8 13 21 g = 34 f = 1 1 2 3 5 8 13 21 34 g = 55 f = 1 1 2 3 5 8 13 21 34 55 g = 89 f = 1 1 2 3 5 8 13 21 34 55 89 f = 1 1 4 9 25 64 169 441 1156 3025 7921 S = 12816

4   Pass
n = 15; S = 602070; assert(isequal(FibSumSquares(n),S))

f = 1 1 g = 2 f = 1 1 2 g = 3 f = 1 1 2 3 g = 5 f = 1 1 2 3 5 g = 8 f = 1 1 2 3 5 8 g = 13 f = 1 1 2 3 5 8 13 g = 21 f = 1 1 2 3 5 8 13 21 g = 34 f = 1 1 2 3 5 8 13 21 34 g = 55 f = 1 1 2 3 5 8 13 21 34 55 g = 89 f = 1 1 2 3 5 8 13 21 34 55 89 g = 144 f = 1 1 2 3 5 8 13 21 34 55 89 144 g = 233 f = 1 1 2 3 5 8 13 21 34 55 89 144 233 g = 377 f = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 g = 610 f = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 f = Columns 1 through 14 1 1 4 9 25 64 169 441 1156 3025 7921 20736 54289 142129 Column 15 372100 S = 602070

5   Pass
n = 21; S = 193864606; assert(isequal(FibSumSquares(n),S))

f = 1 1 g = 2 f = 1 1 2 g = 3 f = 1 1 2 3 g = 5 f = 1 1 2 3 5 g = 8 f = 1 1 2 3 5 8 g = 13 f = 1 1 2 3 5 8 13 g = 21 f = 1 1 2 3 5 8 13 21 g = 34 f = 1 1 2 3 5 8 13 21 34 g = 55 f = 1 1 2 3 5 8 13 21 34 55 g = 89 f = 1 1 2 3 5 8 13 21 34 55 89 g = 144 f = 1 1 2 3 5 8 13 21 34 55 89 144 g = 233 f = 1 1 2 3 5 8 13 21 34 55 89 144 233 g = 377 f = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 g = 610 f = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 g = 987 f = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 g = 1597 f = 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 g = 2584 f = 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 g = 4181 f = 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 g = 6765 f = 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 g = 10946 f = 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 f = Columns 1 through 14 1 1 4 9 25 64 169 441 1156 3025 7921 20736 54289 142129 Columns 15 through 21 372100 974169 2550409 6677056 17480761 45765225 119814916 S = 193864606

6   Pass
n = 26; S = 23843770274; assert(isequal(FibSumSquares(n),S))

f = 1 1 g = 2 f = 1 1 2 g = 3 f = 1 1 2 3 g = 5 f = 1 1 2 3 5 g = 8 f = 1 1 2 3 5 8 g = 13 f = 1 1 2 3 5 8 13 g = 21 f = 1 1 2 3 5 8 13 21 g = 34 f = 1 1 2 3 5 8 13 21 34 g = 55 f = 1 1 2 3 5 8 13 21 34 55 g = 89 f = 1 1 2 3 5 8 13 21 34 55 89 g = 144 f = 1 1 2 3 5 8 13 21 34 55 89 144 g = 233 f = 1 1 2 3 5 8 13 21 34 55 89 144 233 g = 377 f = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 g = 610 f = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 g = 987 f = 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 g = 1597 f = 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 g = 2584 f = 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 g = 4181 f = 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 g = 6765 f = 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 g = 10946 f = 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 g = 17711 f = 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 g = 28657 f = 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 g = 46368 f = 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 g = 75025 f = 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 g = 121393 f = 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 f = 1.0e+10 * Columns 1 through 17 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0003 Columns 18 through 26 0.0007 0.0017 0.0046 0.0120 0.0314 0.0821 0.2150 0.5629 1.4736 S = 2.3844e+10