Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Fibonacci sequence
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Primality testing === The above formula can be used as a [[primality test]] in the sense that if <math display=block>n \mid F_{n \;-\, \left(\frac{5}{n}\right)},</math> where the Legendre symbol has been replaced by the [[Jacobi symbol]], then this is evidence that {{mvar|n}} is a prime, and if it fails to hold, then {{mvar|n}} is definitely not a prime. If {{mvar|n}} is [[composite number|composite]] and satisfies the formula, then {{mvar|n}} is a ''Fibonacci pseudoprime''. When {{mvar|m}} is large{{snd}}say a 500-[[bit]] number{{snd}}then we can calculate {{math|''F''<sub>''m''</sub> (mod ''n'')}} efficiently using the matrix form. Thus <math display=block> \begin{pmatrix} F_{m+1} & F_m \\ F_m & F_{m-1} \end{pmatrix} \equiv \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}^m \pmod n.</math> Here the matrix power {{math|''A''<sup>''m''</sup>}} is calculated using [[modular exponentiation]], which can be [[Modular exponentiation#Matrices|adapted to matrices]].<ref>''Prime Numbers'', Richard Crandall, Carl Pomerance, Springer, second edition, 2005, p. 142.</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)