Anonymous user
Fibonacci matrix-exponentiation: Difference between revisions
m
added whitespace and highlighting, made an aligned (indented) table (instead of a list), inserted commas, added a missing article ("the"), changed sentence structure.
(Added Wren) |
m (added whitespace and highlighting, made an aligned (indented) table (instead of a list), inserted commas, added a missing article ("the"), changed sentence structure.) |
||
Line 1:
{{draft task|Matrices}}
[[Category:Mathematics]]
The '''Fibonacci sequence''' defined with [[wp:Fibonacci_number#Matrix_form|matrix-exponentiation]]:
::::: <math>\begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}^n = \begin{pmatrix} F_{n+1} & F_n \\ F_n & F_{n-1} \end{pmatrix}.</math>
;Task:
Write a program using matrix exponentiation to generate Fibonacci(n) for '''n''' equal to:
:::* 10
:::* 100
:::* 1,000
:::* 10,000
:::* 100,000
:::* 1,000,000
:::* 10,000,000
;Extra:
Generate Fibonacci(2<sup>16 </sup>), Fibonacci(2<sup>32</sup>) and Fibonacci(2<sup>64</sup>) using the same method or another one.
;Related tasks:
* [[Fibonacci sequence]]
* [[Matrix-exponentiation operator]]
<br
=={{header|C sharp|C#}}==
|