| 1 | <?php |
||
| 7 | class Collections |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * Returns a NumberCollection object with the first $terms terms of the Fibonacci sequence (OEIS: A000045) |
||
| 12 | * |
||
| 13 | * NOTE: If what you need is JUST the nth term of this sequence, use the SequenceProvider::nthFibonacciNumber() |
||
| 14 | * function which is much faster at calculating only that term, especially much later in the sequence. |
||
| 15 | * |
||
| 16 | * @param int $terms |
||
| 17 | * @return NumberCollection |
||
| 18 | */ |
||
| 19 | public static function fibonacciCollection(int $terms): NumberCollection |
||
| 44 | |||
| 45 | } |