Update
This commit is contained in:
parent
9a3c73ef48
commit
272ed022c3
11 changed files with 1871 additions and 1836 deletions
6
prime.md
6
prime.md
|
@ -12,7 +12,7 @@ The largest known prime number as of 2022 is 2^82589933 - 1 (it is so called [Me
|
|||
|
||||
Every natural number greater than 1 has a unique **prime factorization**, i.e. a [set](set.md) of prime numbers whose product it is. For example 75 is a product of three primes: 3 * 5 * 5. This is called the *fundamental theorem of arithmetic*. Naturally, each prime has a factorization consisting of a single number -- itself -- while factorizations of non-primes consist of at least two primes. To mathematicians prime numbers are what chemical elements are to chemists -- a kind of basic building blocks.
|
||||
|
||||
**Why is 1 not a prime?** Out of convenience -- if 1 was a prime, the fundamental theorem of arithmetic would not hold because 75's factorization could be 3 * 5 * 5 but also 1 * 3 * 5 * 5, 1 * 1 * 3 * 5 * 5 etc.
|
||||
**Why is 1 not a prime?** Out of convenience -- if 1 was a prime, the fundamental theorem of arithmetic would not hold because 75's factorization could be 3 * 5 * 5 but also 1 * 3 * 5 * 5, 1 * 1 * 3 * 5 * 5 etc. It also makes sense under some different definitions -- imagine for example we create a [tree](tree.md) of numbers, assign each number *N* a parent number *M* which is the maximum of all *N*'s divisors that we check from 1 (including) to *N* (excluding); in this tree prime numbers are all numbers in depth 1, i.e. those that are direct children of 1, but 1 itself is not at this level, it's at the root, having no parent (as it would be its own parent), so by this definition 1 is also not a prime.
|
||||
|
||||
The unique factorization can also nicely be used to encode [multisets](multiset.md) as numbers. We can assign each prime number its sequential number (2 is 0, 3 is 1, 5 is 2, 7 is 3 etc.), then any number encodes a set of numbers (i.e. just their presence, without specifying their order) in its factorization. E.g. 75 = 3 * 5 * 5 encodes a multiset {1, 2, 2}. This can be exploited in cool ways in some [cyphers](cypher.md) etc.
|
||||
|
||||
|
@ -85,7 +85,7 @@ There also exists a term **pseudoprime** -- it stands for a number which is not
|
|||
|
||||
**[Fun](fun.md) with primes**: thanks to their interesting, mysterious and [random](randomness.md) nature, primes can be played around -- of course, you can examine them mathematically, which is always fun, but you can also play sort of [games](game.md) with them. For example the prime race: you make two teams of primes, one that gives 1 modulo 4, the other one that gives 3; then you go prime by prime and add points to each team depending on which one the prime falls in; the interesting thing is that team 3 is almost always in lead just by a tiny amount (this is known as Chebyshev bias, only after 2946 primes team 1 gets in the lead for a while, then at 50378 etc.). Similar thing can be done by evaluating the Mobius function: set total sum to 0, then go number by number and if it only has unique prime factors, add 1 if the number of those factors is even, otherwise subtract 1 -- see how the function behaves. Of course you can go crazy, make primes paint pictures or compose [music](music.md) -- people also like to do this with digits of numbers, e.g. those of [pi](pi.md) or [e](e.md).
|
||||
|
||||
**Can we generalize the concept of prime numbers?** Yeah, sure, why not? The ways are many, we'll rather run into the issue of analysis paralysis -- choosing the interesting generalization of out of the many possible ways. The above mentioned pseudoprimes, superprimes and twin primes are examples of generalizing primes, another one is e.g. defining so called **almost primes** -- a number is *n*-almost-prime if it has *n* prime factors, so 1-almost-primes are just regular primes (they have 1 prime divisor -- themselves) but then there are 2 almost primes like 9 or 15 that are kind of closer to being primes than let's say 5-almost-primes such as 48 or 80. I.e. we took the idea of numbers having either none (primes) or some (non-primes) divisors and generalized it by says a number is more prime like if it has fewer divisors. Similarly we may try to play on this observation: a non-prime is a number that is divisible by something, i.e. there is some number that when dividing the original number gives remainder after division zero; primes are those for which no number gives remainder zero, but some primes might be considered "weaker" by giving very low or very high remainder such as 1, i.e. being "not quite but almost" divisible by something (of course we have to somehow account for the fact that low divisors can only ever give low remainders) -- ideal prime would have remainders after division near the half of the dividing number (it would dodge multiples of other numbers with some margin), which we can formalize and define kind of "prime strength".
|
||||
**Can we generalize the concept of prime numbers?** Yeah, sure, why not? The ways are many, we'll rather run into the issue of analysis paralysis -- choosing the interesting generalization of out of the many possible ways. The above mentioned pseudoprimes, superprimes and twin primes are examples of generalizing primes, another one is e.g. defining so called **almost primes** -- a number is *n*-almost-prime if it has *n* prime factors, so 1-almost-primes are just regular primes (they have 1 prime divisor -- themselves) but then there are 2 almost primes like 9 or 15 that are kind of closer to being primes than let's say 5-almost-primes such as 48 or 80. I.e. we took the idea of numbers having either none (primes) or some (non-primes) divisors and generalized it by says a number is more prime like if it has fewer divisors. Another generalization was hinted on above: construct a [tree](tree.md) of numbers, 1 being the root, assigning each number a parent that's its greatest divisor (exclude the number itself from divisors); in this tree 1 is above prime numbers, prime numbers are on level 1, second level may be seen as the "next best thing" to primes (4, 6, 9, 10, 15, ...), third level the next (8, 12, 18, 27) and so on, i.e. we define the "primeness" as a number of times we have to replace it with its greatest divisor before we get to 1. Similarly we may try to play on this observation: a non-prime is a number that is divisible by something, i.e. there is some number that when dividing the original number gives remainder after division zero; primes are those for which no number gives remainder zero, but some primes might be considered "weaker" by giving very low or very high remainder such as 1, i.e. being "not quite but almost" divisible by something (of course we have to somehow account for the fact that low divisors can only ever give low remainders) -- ideal prime would have remainders after division near the half of the dividing number (it would dodge multiples of other numbers with some margin), which we can formalize and define kind of "prime strength".
|
||||
|
||||
TODO: generalization to non integers? does it exist?
|
||||
|
||||
|
@ -126,4 +126,4 @@ Prime generation: TODO
|
|||
## See Also
|
||||
|
||||
- [perfect number](perfect_number.md)
|
||||
- [happy number](happy_number.md)
|
||||
- [happy number](happy_number.md)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue