Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Fermat number
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
==Applications of Fermat numbers== ===Pseudorandom number generation=== Fermat primes are particularly useful in generating pseudo-random sequences of numbers in the range 1, ..., ''N'', where ''N'' is a power of 2. The most common method used is to take any seed value between 1 and {{nowrap|''P'' β 1}}, where ''P'' is a Fermat prime. Now multiply this by a number ''A'', which is greater than the [[square root]] of ''P'' and is a [[Primitive root modulo n|primitive root]] modulo ''P'' (i.e., it is not a [[quadratic residue]]). Then take the result modulo ''P''. The result is the new value for the RNG. : <math>V_{j+1} = (A \times V_j) \bmod P</math> (see [[linear congruential generator]]) This is useful in computer science, since most data structures have members with 2<sup>''X''</sup> possible values. For example, a byte has 256 (2<sup>8</sup>) possible values (0β255). Therefore, to fill a byte or bytes with random values, a random number generator that produces values 1β256 can be used, the byte taking the output value β1. Very large Fermat primes are of particular interest in data encryption for this reason. This method produces only [[pseudorandom]] values, as after {{nowrap|''P'' β 1}} repetitions, the sequence repeats. A poorly chosen multiplier can result in the sequence repeating sooner than {{nowrap|''P'' β 1}}.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Fermat number
(section)
Add topic